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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
heiligbd
Helper I
Helper I

Differentiate Between Blanks and No Data Measure

Good day,

 

So I have a dataset where as its for on time performance. However, I am having an issue with the current formula regarding differentiating between No data and blank data. Essentially, if there is data and its all blanks, I want the score to be 0%. If there is no data, I want it to read "N/A". How can I change the below measure to account for this? Right now, everything shows "N/A" regardless of if there is no data at all for a given type of material, or if all the data is blank which should read 0%.

 

OD 1d = IF(ISBLANK(CALCULATE(DIVIDE(SUM(ODData[Points < 1d]),SUM(ODData[Points > 14d]),BLANK()),ODData[Reason1stLetter]<>"9")),"N/A",CALCULATE(DIVIDE(SUM(ODData[Points < 1d]),SUM(ODData[Points > 14d]),BLANK()),ODData[Reason1stLetter]<>"9"))
 
The date set has the following:
OrderDateOD1Type

1

10/3/23100%A
210/4/23 A
310/4/23100%B
410/5/23 B
  This would be no in table data for C typeC

 

 
 
 
 
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

@heiligbd Maybe:

OD 1d = 
  IF(
      COUNTROWS('ODData') = BLANK(),
      "N/A",
      CALCULATE(
        DIVIDE(
          SUM(ODData[Points < 1d]),
          SUM(ODData[Points > 14d]),
          BLANK()
        ),
        ODData[Reason1stLetter]<>"9"
      )
   )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

@heiligbd Maybe:

OD 1d = 
  IF(
      COUNTROWS('ODData') = BLANK(),
      "N/A",
      CALCULATE(
        DIVIDE(
          SUM(ODData[Points < 1d]),
          SUM(ODData[Points > 14d]),
          BLANK()
        ),
        ODData[Reason1stLetter]<>"9"
      )
   )


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks Greg. This didn't exactly solve it however, I used your idea of COUNTROWS= BLANK() and created a nested IF statement in front of the rest of my equation and that solved this issue. 

 

Thanks again,

 

Bryant 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.