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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Measure only affected by particular slicer

Hi Experts, 

 

In my dashboard, there is a Measure (Measure_Rank) which ranked the customer by frequency.  

Dax is as follow:

 

Frequency = DISTINCTCOUNT('Table'[Date])
Measure_Rank = 
VAR newtable =
SUMMARIZE ( ALLSELECTED ( 'Table' ), 'Table'[Customer ID] )
RETURN 
RANKX ( newtable, [Frequency],, ASC ) - 1

 

 

However, I want the Measure_Rank control by Date and Centre Code only, Pcode slicer cannot affect the Rank result. 
Wish anyone can help!! thank so much!!

SimonChung_GGGG_1-1646487957510.png

Please find the PBIX here: RFM Demo 4.pbix

7 REPLIES 7
Anonymous
Not applicable

Hello @Jihwan_Kim 
see if you can help, my question here is the extension of my previous post. 

https://community.powerbi.com/t5/Desktop/Percentile-based-on-slicers-selection/m-p/2362811#M850494

Greg_Deckler
Super User
Super User

@Anonymous Can you not just edit the visual interactions? Format | Edit Iteractions and turn off the interaction with the table? Otherise, you should be able to use ALLEXCEPT or REMOVEFILTERS to remove the filters that you don't want.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler let me show you
I added Removefilters
SimonChung_GGGG_0-1646490812303.png

However, it still affect the rank

SimonChung_GGGG_1-1646490837767.png

 

Anonymous
Not applicable

@Greg_Deckler Thanks for your reply.
In my case I cannot use editing the visual interations, because the result is not the end, it will affect the latter part.

Actually I've tried Allexcept and removefilters as well, but it's failed, I cannot manage them well.

@Anonymous You need to use REMOVEFILTERS in your SUMMARIZE so maybe something like:

VAR __Table = SUMMARIZE(CALCULATETABLE('Table',REMOVEFILTERS(...)), ...)

 

You can't use REMOVEFILTERS after the fact from your virtual table.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler OMG!
I just discover that the removefilters is work when date range is not applied.
SimonChung_GGGG_0-1646493451879.png

However, when the date range slicer is applied, removefilters is totally disabled

SimonChung_GGGG_1-1646493481865.png

What's the reason?

 

@Anonymous Tough to say. Perhaps something with your date table is filtering your pcodes?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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