The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I feel like this should be easy, but Powerbi is not behaving how I am expecting.
I have 3 columns of data:
1) UniqueID
2) Location
3) Presence/Absence of Trait (in "yes" or "no").
But some locations only have 1-9 instances, and I'm interested in only those locations with 10 or more.
When I make a table:
Location is rows; trait is column, and "count of uniqueid" is the value.
And then, because there are a bunch of locations and I only want the most active ones, I find the "visual level filter" and limit the "count of UniqueID" to only count those "greater than or equal to 10." So far so good. This limits my location list to just those top locations.
However, when I make that same data into a stacked 100% bar chart, the "visual level filter" doesn't filter the total number of uniqueIDs anymore. It seems to be filtering each trait in the "legend" box separately.
So, for example, if I have a location with 15 UniqueIDs, with 10 "traitYes" and 5 "traitNo", this shows up fine in my table. But in the bar chart, it is filtering out the 5 "traitNo"s because there are less than 10. So instead of that location demonstrating 66% traitYes (as in the table), it's demonstrating 100% traitYes.
How can I limit my bar chart to those locations with 10 or more uniqueIDs in TOTAL, not just those locations with 10 or more uniqueIDs in TraitYes AND TraitNo?
Solved! Go to Solution.
From your description it sounds like you want to ignore the Presence/Absence column when doing the distinct count. You could do this with an expression like the following:
CALCULATE( DISTINCTCOUNT( Table1[UniqueID] ) , ALL( Table1[Presence/Absence of Trait (in "yes" or "no")] ) )
From your description it sounds like you want to ignore the Presence/Absence column when doing the distinct count. You could do this with an expression like the following:
CALCULATE( DISTINCTCOUNT( Table1[UniqueID] ) , ALL( Table1[Presence/Absence of Trait (in "yes" or "no")] ) )