The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi Everybody,
I am struggling with a measure in which i want to ignore one of my slicers and for some reason i can't get it to work. I want to build two measures that show me a comparison between most recent report (latest ATB) and my previous report (2nd latest ATB). Through a RANKX column it is determined which report is the most recent and which is the previous one. In the example A below everything seems fine and it shows me the results i am looking for. However, when i start using my version slicer, it will not show my data from the previous report anymore (see example B). This also counts the other way around, when i select version 3 (previous version) it will not show the most recent value anymore.
example A
example B
The values in these tables come from the following measure:
2nd latest ATB =
CALCULATE(
SUM('ZPS11_totaal overzicht'[Bedrag]),
FILTER('ZPS11_totaal overzicht', 'ZPS11_totaal overzicht'[Post] = "ATB"),
FILTER('ZPS11_totaal overzicht', 'ZPS11_totaal overzicht'[NPO-WBS] = "NPO"),
FILTER('ZPS11_totaal overzicht', 'ZPS11_totaal overzicht'[RANK COLUMN] = 2))
Latest ATB =
CALCULATE(
SUM('ZPS11_totaal overzicht'[Bedrag]),
FILTER('ZPS11_totaal overzicht', 'ZPS11_totaal overzicht'[Post] = "ATB"),
FILTER('ZPS11_totaal overzicht', 'ZPS11_totaal overzicht'[NPO-WBS] = "NPO"),
FILTER('ZPS11_totaal overzicht', 'ZPS11_totaal overzicht'[RANK COLUMN] = 1))
I've also tried calculating "2nd Latest ATB" as following:
2nd latest ATB =
CALCULATE(
SUM('ZPS11_totaal overzicht'[Bedrag]),
FILTER(ALL('ZPS11_totaal overzicht'), 'ZPS11_totaal overzicht'[Post] = "ATB"),
'ZPS11_totaal overzicht'[NPO-WBS] = "NPO" &&
'ZPS11_totaal overzicht'[RANK COLUMN] = 2)
This got me this result:
I feel like i am close to my solution, but so far i couldn't figure it out exactly.
Can anybody help me out?
I believe you should replace ALL with ALLSELECTED and reference your Version column in the ALLSELECTED statement.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
32 | |
20 | |
17 | |
15 |
User | Count |
---|---|
48 | |
33 | |
29 | |
23 | |
20 |