Forum Discussion

heiligbd's avatar
heiligbd
Icon for Helper I rankHelper I
2 years ago
Solved

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

 

 
 
 
 
  • heiligbd Maybe:

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

2 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Icon for Community Champion rankCommunity 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"
          )
       )
    • heiligbd's avatar
      heiligbd
      Icon for Helper I rankHelper I

      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