Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculation Not Working for Calculated Column

Hi Ya'll,

 

I have these 2 formulas:

 

Measure
LTIP Shares = ROUNDDOWN(CALCULATE(SUM(LTIP[Amount]))/'Stock Price'[Stock Price Value],0)
Sample: 25,000 / 54.78 = 456 shares (the round down eliminates the excess because it won't yield a full share)
 

Calculated Column

PSU = Switch(
True(),
LTIP[Management Level] IN {"5B","5A","4B","4A","3"},ROUNDDOWN([LTIP Shares]*.25,0),
LTIP[Management Level] IN {"2","1","0"},ROUNDDOWN([LTIP Shares]*.50,0),
Blank()
)
 
What I want is if a worker is in a specific management level, I want it to spit out 25% or 50% of the LTIP shares for that worker and round down so it give me the full shares. So say the worker is a 5B and they are entitled to 456 shares, they should get 25% of those shares as PSUs and should give me a value of 114 -- it's instead giving me 178! 
 
What am I doing wrong? Been wracking my brain and I feel like I am overlooking something...
 
Any help would be great please! Thanks!
  • Anonymous ,

    You can nor measure in a column.

     

    Try a measure like this


    PSU =
    sumx(Values(LTIP[Management Level]) ,
    Switch(
    True(),
    max(LTIP[Management Level]) IN {"5B","5A","4B","4A","3"},ROUNDDOWN([LTIP Shares]*.25,0),
    max(LTIP[Management Level]) IN {"2","1","0"},ROUNDDOWN([LTIP Shares]*.50,0),
    Blank()
    ))

2 Replies

  • Anonymous ,

    You can nor measure in a column.

     

    Try a measure like this


    PSU =
    sumx(Values(LTIP[Management Level]) ,
    Switch(
    True(),
    max(LTIP[Management Level]) IN {"5B","5A","4B","4A","3"},ROUNDDOWN([LTIP Shares]*.25,0),
    max(LTIP[Management Level]) IN {"2","1","0"},ROUNDDOWN([LTIP Shares]*.50,0),
    Blank()
    ))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Doh! You're right! 

      Thanks so much! I appreciate your help here!