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

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.

Reply
Anonymous
Not applicable

Count Blank Values in a Column

Hi Experts

 

I am trying to count the number of blank values in my table based on another column

Blank Values = CALCULATE(
COUNTROWS('STG Fact_To_Do'),
'STG Fact_To_Do'[Created_Date]=BLANK(),
FILTER('STG Fact_To_Do',ISBLANK('STG Fact_To_Do'[Closed]
 
So if the Created Date Column has blank rows based on the closed column which always has a value in - count the blank cells in Created date column

See Example Data - here we have 3 blank rows...

Created_DateClosed
14 August 20201
 1
23 July 20201
19 August 20201
 1
28 July 20201
 1
22 November 20191
20 August 20201



 
11 REPLIES 11
VijayP
Super User
Super User

@Anonymous  

Count = CALCULATE(COUNTROWS('Table (2)'),FILTER('Table (2)',ISBLANK('Table (2)'[Created_Date])))
Try this 
Regards
Vijay Perepa



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

HI Vijay

 

I am getting blank result in  score card....not the value 3

@Anonymous 

Please find tjhe attached file

https://drive.google.com/file/d/1Knkn7OtNHejWJ1lllVDgQ9TN-cdrm4fI/view?usp=sharing

 




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@Anonymous , I was able to get 3 . Posted file in last update

Anonymous
Not applicable

Ok i forgot to mention my FACT Table TO DO links to a DIM Date table (1 to *) relationship Date to Created Date (FACT Table). i am still getting blank values???

@Anonymous ,

+0 to a measure and count zeros. Can you share the complete sample?

Anonymous
Not applicable

Hi AMit

 

I cannot upload a file nor send a drobox link. If you create a simple DIM Date Table and link DAte from Dim DAte to Created Date in FACT table and see if the measure works

@Anonymous 

Then Formula will be calculate(countrows(facttable),filter(all(datestable),isblank(datesinfacttable))




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


amitchandak
Super User
Super User

@Anonymous , Try like

countrows(filter('STG Fact_To_Do', isblank(Created_Date)))

 

or

calculate(countrows('STG Fact_To_Do'),filter('STG Fact_To_Do', isblank(Created_Date)))

Anonymous
Not applicable

Both DAX formula return back blank as oppsed to the value 3

@Anonymous , Please find the find attached after signature

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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