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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
gluizqueiroz
Resolver I
Resolver I

How to create a "reverse" slicer filter? Select thing and shows the except

I have a table with some sales, like the following:

 

Id_ProductProductGroupSubgroupValue_SoldDate_Sold
1ComputerEletronicsIT10002018-05-01
1ComputerEletronicsIT10002017-06-01
1ComputerEletronicsIT10002017-07-01
2MouseEletronicsPeripherals252018-05-01
2MouseEletronicsPeripherals252018-06-01
3HeadphoneEletronicsSound352018-12-01

 

I need to make a entire page that suffer the inverse action of slicer.

 

On my table I have sales on May/June/July and December and on 2017 and 2018.
If the user selects DECEMBER/2018 for example, my entire page should show only sales that NOT HAPPENED on DECEMBER, something like the inverse filter. 

The user select a month and the page shows values different than selected value. 

By the way, my page has a table and I show wich product not sold on selected date, I cannot show only SUM of Value_Sold, I need show the products with their own group, subgroup and name.

Is it possible?

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

I built one of those once:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Inverse-Aggregator/m-p/342266

 



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

3 REPLIES 3
Greg_Deckler
Super User
Super User

OK, I was able to accomplish it. So, what you need is a Separate table for your dates like:

 

 

Table = DISTINCT('Table'[Date_Sold])

Relate that to your main table. Create a slicer based upon this new table but Edit Interactions such that it does not interact with your table. Now, create a Measure like:

 

 

Measure 2 = 
VAR __selected = MAX(Table8[Date_Sold])
VAR __current = MAX(Table7[Date_Sold])
VAR __yearSelected = YEAR(__selected)
VAR __monthSelected = MONTH(__selected)
VAR __yearCurrent = YEAR(__current)
VAR __monhtCurrent = MONTH(__current)
RETURN
IF(__yearCurrent = __yearSelected && __monhtCurrent = __monthSelected,0,1)

Now, filter on that for Greater than 0. 

 

See Page 4, Tables 7 and 8 of attached.

 

 



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Hello!

 

I know this topic is old, but I have a similar problem and this approach seems to be an option.

In my case I have 4 different states for a project (that would be a slicer) and then I have a table with many part numbers which have a state as well.

My goal is to revers filter based on these rules: 

- If I select P, I want to see A, B and C.

- If I select C, I want to see B and A.

- If I select B or A, I want to see A.

 

Does anybody has any idea on how to accomplish it?

Many thanks in advance!

Greg_Deckler
Super User
Super User

I built one of those once:

 

https://community.powerbi.com/t5/Quick-Measures-Gallery/Inverse-Aggregator/m-p/342266

 



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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