March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Any idea how this can be achieved?
Yes, like I said previously, you can create a measure and use something like COUNTROWS( yourtablename ).
Or if you do a sum or count over another column which does not have any null values it will work too. (which is why some previous charts may have worked)
Or you could replace the nulls with an explicit value like "UNKNOWN" or something like that as part of the Power Query definition when you import the data.
This is probably due to how you've set up "Count of PositionResponsible".
If you are counting over the column in the related table with the invalid relationship that is responsible for generating the (blank) values then this is the expected behaviour as the related table would not include the explicit blanks. Or if you are doing COUNTROWS(DISTINCT()) the DISTINCT() function does not return blanks from invalid relationships.
Hi @d_gosbell
Thanks for the answer.
The count is regular one, not distinct*. I just draged and droped the field to the Value box.
There is no relationships, all data originated from the same data source.
*Count Distinct shows the balnk value, but the numbers are wrong of course.
Ta!
Ah, OK so those (blank) values must be explicit null values coming in from your data source. In that case the issue is that the default count that Power BI does uses the COUNTA function and from the documentation:
The COUNTA function counts the number of cells in a column that are not empty. It counts not just rows that contain numeric values, but also rows that contain nonblank values, including text, dates, and logical values.
So it is explicitly ignoring the blank values.
The fix for this is to create a new measure yourself that uses whatever logic you need to get your count.
Maybe something simple like COUNTROWS( tablename ) will work.
Hey,
Thanks for the explanation.
But I find it a bit strange, as in the past I always saw blank values in my visualisations.
And yes, you are right. The blanks are original there, I just wanted to show them in the visuals I have created.
Any idea how this can be achieved?
Thanks
A
Any idea how this can be achieved?
Yes, like I said previously, you can create a measure and use something like COUNTROWS( yourtablename ).
Or if you do a sum or count over another column which does not have any null values it will work too. (which is why some previous charts may have worked)
Or you could replace the nulls with an explicit value like "UNKNOWN" or something like that as part of the Power Query definition when you import the data.
Hey @d_gosbell
Thanks for the advice.
I decided to replace the null values on data load stage.
Thanks!
A
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
87 | |
70 | |
51 |
User | Count |
---|---|
206 | |
150 | |
97 | |
78 | |
69 |