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.
Hi Everyone,
I'm not sure if I encountered a bug or if I'm doing something incorrectly. I put together a card visual that provides a count of the assets that meet a certain set of criteria. I'm using three columns for the visual: "Asset", "Colour Formatting", and "Latest". "Asset" provides the asset name; "Colour Formatting" reports a 0, 1 or 2 based on certain criteria; and "Latest" finds the latest time stamp for each asset. If that's not clear, here's a snippet of the data:
And here's a snippet of the set up for the visual:
The count is set as Count (Distinct). Now, the filters I'm applying will mean that there will be 0 assets in the count (I know this by manually checking), but it shows '(Blank)' in the card. I know this set up works because I'm using something very similar for another count, the only difference being that Colour Formatting is set as 2. Is there a workaround for this?
Thanks,
Dan
Ya, this is the "by design" behavior. Taking a sum of a "no rows" returns a blank, not zero. Same with distinctcount etc.
I would just write a custom measure:
My Distinct Count := DISTICTCOUNT(MyTable[MyColumn]) + 0
The +0 will obviously have no impact on any "valid" result, but Blank + 0 will be 0, and should give you what you want.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
105 | |
88 | |
73 | |
66 |
User | Count |
---|---|
124 | |
113 | |
98 | |
80 | |
72 |