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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
vnqt
Helper V
Helper V

Histogram based on a filter

Hi, 

 

 I would like to create a histogram as below : 

vnqt_1-1662635279353.png

 

Here are the data

Name GroupSub-group 
A1234W123AAA
B1234w123AAA
C1234w456AAA
D1234w456AAA
D1234w789AAA
D1234w789AAA
D1234w456AAA
E1236w789AAA
E1238w456AAA
A1236w789BBB
A1237w123BBB
D1237w456BBB
D1235w456BBB
E1237w789BBB
E1239w456BBB
B1236w789CCC
B1237w123CCC
E1234w789CCC
E1235w123CCC
A1235w123DDD
B1235w456EEE
C1235w456FFF
C1237w123III
C1236w789UUU


Could you please advise how I could exclude the Name where the Sub-group has only 1 Name: 

For example :  the following Name should be removed from the histogram

Name GroupSub-group 
A1235w123DDD
B1235w456EEE
C1235w456FFF
C1237w123III
C1236w789UUU

 

Thank you in advance.

 

1 ACCEPTED SOLUTION
PowerUserR
Solution Supplier
Solution Supplier

Hi,

You could create a new column like this: 

PowerUserR_0-1662637163868.png


And then use that new column as a filter for the visual and exclude when value is less than 2. Or inlude only those that are greater than 1: 

PowerUserR_1-1662637336624.png

 



I hope that helps 🙂 

View solution in original post

4 REPLIES 4
PowerUserR
Solution Supplier
Solution Supplier

Hi,

You could create a new column like this: 

PowerUserR_0-1662637163868.png


And then use that new column as a filter for the visual and exclude when value is less than 2. Or inlude only those that are greater than 1: 

PowerUserR_1-1662637336624.png

 



I hope that helps 🙂 

Thank you. 

Here is the DAX I use : 

= Calculate(DISTINCTCOUNT(Table[Name]), FILTER(Table, EARLIER(Table[Subgroup]) = Table[Subgroup]))

However, I find out that there are many "null" values in the column Sub-group. 

How could I compare the sub-group column which is in another table that has relation to this table?

I do something similar for the Matrix , then filter the value > 1. 

vnqt_0-1662644173726.png

But for the histogram, I can't do this filter. 

 

 

 

I am not sure what you are trying to do with the null values.

Would you want to use something like this? https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax

Does the other table's sub group have null values as well?

Thank you for the info. I would try this. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

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

August Carousel

Fabric Community Update - August 2024

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