Forum Discussion
Formula "IF(ISBLANK"
Hello,
I set up the following measure in Power BI but I want to add this logic to the formula:
"If its blank then 25"
I am not sure how to add the above into the formula below. Can someone please advise?
You can try either use the third argument in divide (if the blank values are caused by a missing denominator), or use the coalesce function.
DIVIDE( [Maximum Exposure Amount v2], SUM('enav_raw_input_manual_run'[enav_post_hc8]), 25 ) OR COALESCE(DIVIDE( [Maximum Exposure Amount v2], SUM('enav_raw_input_manual_run'[enav_post_hc8])), 25 )- Anonymous2 years ago
Hello,
You can try this simple format to achieve it.
"If its blank then 25" -> If(ISBLANK())
If(ISBLANK(DIVIDE(
[Maximum Exposure Amount v2],
SUM('enav_raw_input_manual_run'[enav_post_hc8])
)),25,DIVIDE(
[Maximum Exposure Amount v2],
SUM('enav_raw_input_manual_run'[enav_post_hc8]))or you can try to use "var" as the variable parameter.
var1 = DIVIDE([Maximum Exposure Amount v2],SUM('enav_raw_input_manual_run'[enav_post_hc8])
return IF(ISBLANK(var1),25,var1)
2 Replies
- vicky_
Super User
You can try either use the third argument in divide (if the blank values are caused by a missing denominator), or use the coalesce function.
DIVIDE( [Maximum Exposure Amount v2], SUM('enav_raw_input_manual_run'[enav_post_hc8]), 25 ) OR COALESCE(DIVIDE( [Maximum Exposure Amount v2], SUM('enav_raw_input_manual_run'[enav_post_hc8])), 25 ) - AnonymousNot applicable
Hello,
You can try this simple format to achieve it.
"If its blank then 25" -> If(ISBLANK())
If(ISBLANK(DIVIDE(
[Maximum Exposure Amount v2],
SUM('enav_raw_input_manual_run'[enav_post_hc8])
)),25,DIVIDE(
[Maximum Exposure Amount v2],
SUM('enav_raw_input_manual_run'[enav_post_hc8]))or you can try to use "var" as the variable parameter.
var1 = DIVIDE([Maximum Exposure Amount v2],SUM('enav_raw_input_manual_run'[enav_post_hc8])
return IF(ISBLANK(var1),25,var1)