Forum Discussion
SelflearningBi
3 years agoHelper III
COUNT NOT BLANK
| MODEL NAME | ON TIME? |
| A | YES |
| B | |
| C | NO |
| D | NO |
I would like to see how many % on time is YES. The calcuation should look like this 1/3=33%
I dont want to include the blank B in my total.
How to write DAX measure ?
Hi,
Please check the below picture and the attached pbix file.
Yes percentage measure: = VAR _yes = COUNTROWS ( FILTER ( Data, Data[ON TIME?] = "YES" ) ) VAR _allcountwithoutblank = COUNTROWS ( FILTER ( Data, Data[ON TIME?] <> BLANK () ) ) RETURN DIVIDE ( _yes, _allcountwithoutblank )
1 Reply
- Jihwan_KimSuper User
Hi,
Please check the below picture and the attached pbix file.
Yes percentage measure: = VAR _yes = COUNTROWS ( FILTER ( Data, Data[ON TIME?] = "YES" ) ) VAR _allcountwithoutblank = COUNTROWS ( FILTER ( Data, Data[ON TIME?] <> BLANK () ) ) RETURN DIVIDE ( _yes, _allcountwithoutblank )