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
landoc
Frequent Visitor

How to get the opposite count of a filtered visual

So I have a column chart that gives me a count of items based on multiple different fields in the axis. What I want to do is flip this data so that I can see the count of items where these data fields don't apply. If someone has a suggestion please let me know. Thanks in advance and let me know if there is any additional information that I need to provide. Essentially I want the opposite of my data. 

7 REPLIES 7
Greg_Deckler
Super User
Super User

@landoc So like this? Inverse Aggregator - Microsoft Power BI Community


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

So each name would pop up in multiple rows. I would need to create something that can filter out names that contain each one of these values. So in this example if I wanted to show the count of names that don't relate to value 1 then I would get 1 name.  In the case of this table it would only be name:2345. I should be able to show this data in a visual or table. 

namedata values

1234

value 1
1234value 2
1234value 3
2345value 2
2345value 3
2345value 4

@landoc So more like: Inverse Selector - Microsoft Power BI Community

Let's see:

Measure = 
  VAR __SelectedNames = DISTINCT('Table'[name])
  VAR __AllNames = DISTINCT(ALL('Table'[name]))
RETURN
  COUNTROWS(EXCEPT(__AllNames,__SelectedNames))

 


@ 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 Do I still need a second table for this measure? I'm trying to make the comparison between this measure and the link you sent me. The link looks like exactly what I need. 

@landoc Probably not, would have to actually test it. But the ALL should get rid of the slicer filter context and so you *should* be able to get away with a single 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...

I tried it and didn't get the correct result. I think what I really need to do is create a new column. 

@landoc Would ned to see sample data.


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

Top Solution Authors