Forum Discussion
Ignore blanks in If Statement - Calculated Column
Hello Guys,
I have a Column as Coverage and i need to Consolidate the Coverage into 3 categories. Below Formula works but the challange is for "Blank" rows, it consider as below 80 and returns the Coverage % as 80%. But it should not consider the Blanks.
Can anybody help me please.
| Coverage | Coverage % |
| 10 | 80% |
| 0 | 80% |
| 80% | |
| 93 | 90% |
| 80 | 80% - 90 % |
Hi, Anonymous
Based on your description, I created data to reproduce your scenario.
Then you could create a calculated column as follows.
Coverage % = IF( ISBLANK(Summary[Coverage]), BLANK(), IF( Summary[Coverage]<0.8, "80%", IF( Summary[Coverage]<0.9, "80%-90%", "90%" ) ) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, Anonymous
If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.
Best Regards
Allan
4 Replies
- judspud
Solution Supplier
Hi Anonymous,
You could use the AND function within the first part of the IF statement to say if it is not blank and <0.80.
https://docs.microsoft.com/en-us/dax/and-function-dax
Or you could nest an IF statement to say if its blank then x else if its <0.80
Hope this helps
Thanks,
George
- AnonymousNot applicable
Hi judspud
I Tried in below way by using AND, but again it takes blank into consideration. Looks like i am missing something but unable to find it.
Coverage % = IF(AND('Summary'[Coverage]>=0,'Summary'[Coverage< 0.80),"80%",IF(AND('Summary'[Coverage>=0.80, Summary'[Coverage<0.90),"80% - 90 %",IF(AND('Summary'[Coverage>=0.90, 'Summary'[Coverage<100.90),"90%","")))
- v-alq-msft
Community Support
Hi, Anonymous
Based on your description, I created data to reproduce your scenario.
Then you could create a calculated column as follows.
Coverage % = IF( ISBLANK(Summary[Coverage]), BLANK(), IF( Summary[Coverage]<0.8, "80%", IF( Summary[Coverage]<0.9, "80%-90%", "90%" ) ) )Result:
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- v-alq-msft
Community Support
Hi, Anonymous
If you take the answer of someone, please mark it as the solution to help the other members who have same problems find it more quickly. If not, let me know and I'll try to help you further. Thanks.
Best Regards
Allan