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
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

 


@ 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...

View solution in original post

2 REPLIES 2
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.

 

 


@ 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...
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

 


@ 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.