cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
stibra
Frequent Visitor

Measure Count and include blanks

Hi,

 

I would like to create a simple measure from table 1, Column 2 where the result should be a count of Green, Blue and Blanks. When working with visuals it does not include the blank cells.

 

Table 1

 

Column 1   Column 2

Case 1        Green

Case 2        Blue

Case 3

Case 4        Green

Case 5        Blue

Case 6

Case 7        Green

Case 8        Blue

 

Result:

Green = 3

Blue = 3

Blank = 2

 

Any idea how I could display the blanks in the visual part? (Either by counting blanks or adding zeros)

 

Br

Stian

 

1 ACCEPTED SOLUTION

Ok understand it....

 

-Goto Edit Queries From Home Tab

-Select Column which has NULL Values

-Click on Replace Values

-Replace 'null' values with nothing

-Click 'OK'

-Close & Apply

 

Now you will see blank values in Donut Chart

BlankValues.png.jpgBlankValues2.jpg

View solution in original post

8 REPLIES 8
124578dtt4trt4
Regular Visitor

what DAX can we equate this to?  - for those who want to know?

Adeel_Yousaf
Frequent Visitor

image.png

Add calculated column and you get what you want.
 
Count Required for test = COUNT(Table1'[Required for Test])
FarhanAhmed1984
Resolver III
Resolver III

What Visual you are working on  ???

 

You can see blank Values with counts unless you have Page /Report/Visual Level filter applied on it for blank values

 

BlankValues.png

Hi,

 

This is how it looks for me:

2017-12-11_1748.png

Ok understand it....

 

-Goto Edit Queries From Home Tab

-Select Column which has NULL Values

-Click on Replace Values

-Replace 'null' values with nothing

-Click 'OK'

-Close & Apply

 

Now you will see blank values in Donut Chart

BlankValues.png.jpgBlankValues2.jpg

Hi and thanks for the assistance.

 

This worked fine when I use excel as data source, but my real data uses direct queries from an sql database / view. That's probably why I need to figure out how to create a meaure that prints 0 instead of "null"

 

 

Then you should use ISNULL/COALESCE in SQL queries to handle Null Values.

stibra
Frequent Visitor

Forgot picture

 

2017-12-11_1827.png

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors