Hi Brian,
This is great. Thanks so much for your assistance and help. It took me sometime to understand the measure to be honest.
Do you mind to explain a bit, while in CALCULATETABLE -->
CALCULATETABLE(
ADDCOLUMNS(
FactInternetSales,
“AgingVirt”, [Aging]
),
ALLSELECTED( DimDate[FullDateAlternateKey] )
)
Is it this virtual table will only contain the date in current row?
Secondly, my final goal is actually to put the Age into some aging bucket. There is one table I have with the setup of Min and Max like usual Aging report.
Unfortunately, even when I try to hardcode the bucket category, I always have an error.
I tried with simple category first, by hardcode it like below, but it is not correct and even the row is wrong.
Aging bucket =
VAR VirtualTable =
CALCULATETABLE(
ADDCOLUMNS(
FactInternetSales,
“AgingVirt”, [Aging]
),
ALLSELECTED( DimDate[FullDateAlternateKey] )
)
VAR TotalAging = IF(
HASONEVALUE( FactInternetSales[SalesOrderNumber] ),
[Aging2],
SUMX (
VirtualTable,
[AgingVirt]
)
)
RETURN IF(TotalAging < 7, “Small”,“Big”)
Can you help to tell what I should do to correct it ?
Really appreciate your help.
Thanks,