Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello everyone,
I have the following function:
YEAR | MAX =
VAR vals =
SUMMARIZE(
'Date' ,
'Date'[Year],
"myMeasure", CALCULATE([Prod | Max | AllY], ALL('Date'))
)
VAR measureMax = MAXX(vals, [myMeasure])
VAR y_value = calculate(MAXX(FILTER(vals, [myMeasure] = measureMax), 'Date'[Year]))
RETURN
y_value
The measure [Prod | Max | AllY] is:
calculate(MAXX(BD,BD[Production]), ALL('Date'[Year]))
Both tables (BD and Date) are connected via Date[Date] -> BD[Date] in a 1-to-many relationship both directions.
I checked the var measureMax and its working properly.
The var y_value is however, wrong! Its returning the year as if the ALL function wasn't there.
I tried different approaches (like addcolumns and so on) but with no success.
What am I missing?
Thank you.
Solved! Go to Solution.
Solution was:
VAR MaxValue = calculate([Prod | Max | AllY], ALL('Date'[Year]))
RETURN
CALCULATE(
MAX('Date'[Year]),
FILTER(
ALL('Date'[Year]),
[Prod | Max | AllY] = MaxValue
)
)
Solution was:
VAR MaxValue = calculate([Prod | Max | AllY], ALL('Date'[Year]))
RETURN
CALCULATE(
MAX('Date'[Year]),
FILTER(
ALL('Date'[Year]),
[Prod | Max | AllY] = MaxValue
)
)
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
15 | |
7 | |
6 |