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,
I've several quite simple DAX aggregations measures such as :
EXPENSES_2022=CALCULATE(measures[EXPENSES], data[YEAR]=2022)
I'd like to use a "variable" instead of 2022 which can be shared between several measures and evolve automatically when we have year changes, so I created a measure :
YEAR_N = MAX(data[YEAR])
I tried this :
EXPENSES_MAX=CALCULATE(measures[EXPENSES], data[YEAR]=global_VARIABLES[YEAR_N])
I got an error message (something talking about PLACEHOLDER instead of boolean value ...).
on the forum, I found something about adding filter function So , my new formula became :
EXPENSES_MAX=CALCULATE(measures[EXPENSES], FILTER(data,data[YEAR]=global_VARIABLES[YEAR_N]))
technically, I've a result, but the calculation gives me much more data (I don't understant yet where it comes from). Do you know what consequences the use of FILTER can have in the calculation (suppressing others filters etc ...)
regards
Before you start creating calculations, you should read something upon CALCULATE: Introducing CALCULATE in DAX - SQLBI
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
10 |
User | Count |
---|---|
19 | |
16 | |
14 | |
11 | |
9 |