cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Re: Table Measure

Hi,

 

I wanted to have 3 cases (actual/ plan) in same coloum

 

               actual      plan       actual/ plan            progress %

case 1 :     2             2     => actual / Plan        => 100%

case 2 :    blank      3      =>  blank/ 3               =>  0%

case 3 :     3            blank  =>3 / blank              => 300%

 

is it clear??

thanks,

 

 

Highlighted
d_gosbell Member
Member

Re: Table Measure

I'm not sure if that helps as you've swapped the logic for cases 2 & 3 from what you stated earlier in this thread.

 

But I think the easier way to handle these 3 cases is to just use 2 nested IF's

 

eg. 

 

Progress = 
VAR _actualSum = SUM ( 'table2'[Actual Plan# )
VAR _planSum = SUM( 'table1'[Start Plan#] )
RETURN IF(ISBLANK(_actualSum)
  ,0
  IF(ISBLANK(_planSum)
    , _actualSum 
    , DIVIDE ( _planSum , _actualSum
)
  )
)

 

Although the logic above is using the original definitions, not the cases you just posted, but hopefully the above is simpler to understand and you can change it around if needed