Forum Discussion

hushpuppies's avatar
hushpuppies
Frequent Visitor
2 years ago
Solved

Need help with measure

Hi PowerBI Experts!

 

Here's the current measure for "Remark"

 

If(isblank(Sum(PS_Financials[CurrentBudget])), if( Sum(PS_Financials[Actual]) > 15000,"At Risk",if( Sum(PS_Financials[Actual]) > 0," On Forecast",blank())), If( isblank([#Spend %]) ,"",If( [#Spend %] > 1,"Over Budget",If( [#Spend %] > 0.9 ,"Issue", If( [#Spend %] > 0.75, "At Risk","On Forecast")))) )

 

The item in red box should return "At Risk" under Remark column. May I know why is it not the case?

 

Basically, this is the logic that I want :-

 

  1. IF Actuals > 90% of the budget and Actual < Current Budget, then "Issue" (flagged as Purple)
  2. IF Actuals > Current Budget, then "Over Budget" (flagged as Red)
  3. IF Actuals < 90% of the budget and > 75% of the budget, then "At Risk" (flagged as Orange)
  4. IF Actuals < 75% of the budget, then "On Forecast" (flagged as Green)
  5. IF Budget = 0 and Actuals > 15,000 ($20,000 x 75%), then "At Risk" (flagged as Orange)
  6. IF Budget = 0 and Actuals < 15,000 ($20,000 x 75%), then "On Forecast" (flagged as Green)

 

Thank you!

 

 

  • Hi hushpuppies

     

    Your  first condition says that SUM ( PS_Financials[CurrentBudget] ) must be blank before proceeding to the next.  However, the row in question is showing  zero. Try changing  ISBLANK ( SUM ( PS_Financials[CurrentBudget] ) ) to ISBLANK ( SUM ( PS_Financials[CurrentBudget] ) ) || SUM ( PS_Financials[CurrentBudget] )  = 0

2 Replies

  • Hi hushpuppies

     

    Your  first condition says that SUM ( PS_Financials[CurrentBudget] ) must be blank before proceeding to the next.  However, the row in question is showing  zero. Try changing  ISBLANK ( SUM ( PS_Financials[CurrentBudget] ) ) to ISBLANK ( SUM ( PS_Financials[CurrentBudget] ) ) || SUM ( PS_Financials[CurrentBudget] )  = 0