Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Wilm117
Helper I
Helper I

Ignoring slicers using mutlple filter expressions in DAX measure

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

Wilm117_0-1627389884908.png

 

example B

Wilm117_1-1627390138550.png

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:

Wilm117_2-1627390714423.png

 I feel like i am close to my solution, but so far i couldn't figure it out exactly. 

 

Can anybody help me out?

 

 

1 REPLY 1
Anonymous
Not applicable

I believe you should replace ALL with ALLSELECTED and reference your Version column in the ALLSELECTED statement.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.