Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |