Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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
)
)
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |