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
venug20
Resolver I
Resolver I

Display state wise sales - exclude slicer selection

Hi everyone,

 

I have one table

 

I want to display "sales", based on Slicer selection.

 

I have taken "State" into slicer. When choose state in slicer, show all state wise sales, except slicer selection.

 

Please help on this....  Thanks in Advance.....

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @venug20,

 

Normal slicer not support exclude filter affect, you need to do some custom steps with a measure as filter to achieve this effect.
Please take a look at attachment files if it works on your side.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

7 REPLIES 7
v-shex-msft
Community Support
Community Support

Hi @venug20,

 

Normal slicer not support exclude filter affect, you need to do some custom steps with a measure as filter to achieve this effect.
Please take a look at attachment files if it works on your side.

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi @v-shex-msft / Xiaoxin Sheng,

 

Thank you very much for your reply. It's really great work. I am really apriciate your efforts.

 

Please let me explain, what i am expecting output. Please see below snapshots...

 

When i take "State" wise sales into visual, it show like below... (Total is : 1,37,15,444.31)

 

Slicer-State-1.jpg

 

 

when i exclude state as "Abia" using basic filter (Visual level), it show like below... (Total is : 1,37,14,380.19)

 

Slicer-State-2.jpg

 

You provided file shown state wise sales, when i exclude state as "Abia" from slicer. it show like below... (Total is : 9,08,620.78)

 

Slicer-State-3.jpg

 

here some state sales are missing, your approch is 100% correct.

 

but State wise sales total giving wrong. Please suggest to is there any way to get correct output....

 

Please help on this requirement..... 

 

Once again thank you for your reply....

 

 

 

 

@venug20 Please remove "Market" field from the second visual, then the counts will match as expected.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




Thanks @v-shex-msft it is working fine...

 

Thanks @PattemManohar. you suggestion is perfect...

 

 

@v-shex-msft

 

Can you explain step by step, how it's working...

Hi @venug20,

 

Selector table is used to be the source of slicer, that you can use 'allselected' function to get selected items from slicer.

 

Selectedvalue function is used to get current row content, then you can compare selected items and current row content to return tag Y if current row are in selected items.

 

Drag this measure to visual level filter and keep 'N' tag records which means not include in selected items.

 

Notice: please not create relationship from selected table to original table, it will keep slicer operation only works on measure and not filter on original table.

Reference links:

SELECTEDVALUE Function

ALLSELECTED Function (DAX)

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hi Xiaoxin Sheng / @v-shex-msft,

 

Thanks for your explanation, now i understood...

PattemManohar
Community Champion
Community Champion

@venug20 Just want  to understand, what is the scenario or reason behind to use the Slicer as an exclusion criteria.





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




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.