Forum Discussion
Disruption due to formula
When we select "Show items with no data", a blank row appears. How to fill the blank row with 0 ?
I have tried this formula:
if(isblank(calculate(sum(amount), sameperiodlastyear(date))),0,calculate(sum(amount), sameperiodlastyear(date))))
But this formula disrupts other column which is driven by an IF statememt:
if(Country = "United States of America" && month(date)>=1 && month(date)<=3, 100,
If(Country = "United States of America" && month(date)>=4 && month(date)<=6, 200,
if(Country = "United States of America" && month(date)>=7 && month(date)<=9, 300,
if(Country = "United States of America" && month(date)>=10 && month(date)<=12, 400)
it is adding extra 0's in the visual.
I am totally confused on why the first formula is caused such big issues.
Appreciate your quick responses.
Hi salonikhedkar_1 ,
Modify your measure as below:
if(Country = "United States of America" && month(date)>=1 && month(date)<=3, 100, If(Country = "United States of America" && month(date)>=4 && month(date)<=6, 200, if(Country = "United States of America" && month(date)>=7 && month(date)<=9, 300, if(Country = "United States of America" && month(date)>=10 && month(date)<=12, 400,0)Add "0" at the end of the last if statement,otherwise it will return blank for other criteria.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!
3 Replies
- amitchandak
Super User
salonikhedkar_1 , Try like
calculate(sum(amount), sameperiodlastyear(date))+0
- salonikhedkar_1
Helper II
i have tried this formula. It works similar to my formula. It also is causing disruption.
- v-kelly-msft
Community Support
Hi salonikhedkar_1 ,
Modify your measure as below:
if(Country = "United States of America" && month(date)>=1 && month(date)<=3, 100, If(Country = "United States of America" && month(date)>=4 && month(date)<=6, 200, if(Country = "United States of America" && month(date)>=7 && month(date)<=9, 300, if(Country = "United States of America" && month(date)>=10 && month(date)<=12, 400,0)Add "0" at the end of the last if statement,otherwise it will return blank for other criteria.
Best Regards,
KellyDid I answer your question? Mark my post as a solution!