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.
I have this DAX that works in DAX Studio and returns the expected value.
DEFINE
VAR DateFilter = FILTER(
KEEPFILTERS(VALUES('DIM Date'[Full Date])),
AND( 'DIM Date'[Full Date] >= DATE(2019, 1, 1),
'DIM Date'[Full Date] < DATE(2020, 1, 1) ) )
var tbl = TOPN( 100,
SUMMARIZECOLUMNS(
'DIM Date'[Month Year Short Description],
DateFilter
,"A1", [Availability] ) )
VAR R = GROUPBY ( tbl,
"A2", MAXX( CURRENTGROUP(), [A1]) )
EVALUATE
R
I'm wanting the measure to look back 12 months and return the maximum monthly value in that period.
When the expression is created in SSAS Tabular Cube or Power BI (after replacing Evaluate with return) I get this error message.
SummarizeColumns() and AddMissingItems() may not be used in this context.
Any help on how to rewrite this, as a single measure that will work, would be greatly appreciated, thanks.
Solved! Go to Solution.
Hi,
You may download my revised PBI file from here.
Hope this helps.
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 |
---|---|
107 | |
100 | |
85 | |
77 | |
66 |
User | Count |
---|---|
120 | |
112 | |
94 | |
84 | |
75 |