Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hello everyone,
I'm creating an aging report based on user selection of date, and recently I've been confused on the logic of how to put a measure correctly in a matrix.
I've attached a link to my sample for easier explanation :
Aging range = VAR VirtualTable = CALCULATETABLE( ADDCOLUMNS(FactInternetSales, "TmpAging", [Aging with Total] ), ALLSELECTED(DimDate[FullDateAlternateKey]) ) RETURN CALCULATE([Total sales amount], FILTER(VirtualTable, COUNTROWS( FILTER(Range, [TmpAging] >= Range[Min] && [TmpAging] <= Range[Max] ) ) > 0 ) )
Aging range 2 = VAR VirtualTable = ADDCOLUMNS(FactInternetSales, "TmpAging", CALCULATE( [Aging with Total], CALCULATETABLE(FactInternetSales, ALLSELECTED(DimDate[FullDateAlternateKey]) ) ) ) RETURN CALCULATE([Total sales amount], FILTER(VirtualTable, COUNTROWS( FILTER(Range, [TmpAging] >= Range[Min] && [TmpAging] <= Range[Max] ) ) > 0 ) )but it seems not working.
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi Ashish,
It's great.
In your code ->
ADDCOLUMNS( VALUES(FactInternetSales[SalesOrderNumber]), "ABCD", CALCULATE ( [Aging], CALCULATETABLE ( VALUES(FactInternetSales[SalesOrderNumber]) ), ALLSELECTED() ) ),
I'm not sure why we need to specify Saler Order Number or in other word, it needs only one column "Sales Order Number" in that "virtual table". However it is works!!
Thank you very much for your help.
GBU.
You are welcome.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
113 | |
99 | |
86 | |
35 | |
35 |
User | Count |
---|---|
150 | |
100 | |
78 | |
61 | |
56 |