cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using context with calculated variables

0 Likes
1,451

Hi,

Hoping to get some answers. I have the 5 green columns as calculated measures.

I want to remove Employee - Key and keep Tenure & Classification dim and summarize it like the 2nd table.

It should summarize as

If (vProfit & VPosition & vPay & vTenure & vClass) = 1, Then Unmodified Amount = 1.0000 Else Unmodified Amount for each Employee - Key. What I have in Orange column is the desired output.

I've tried numerous ways but is it possible to use context in calculated figures? When I remove Employee - Key from the table, all the calculated figures (green column) just sum up and the above if statement breaks because it is no longer looking at by Employee - Key.

Thank you !

View Entire Topic
ayman_salem
Active Contributor
0 Likes

For your second problem, do the following,

Define the following variable:

v_vProfit: =[vProfit] (type Dimension)

v_vProfit_Count: =Count([Profit Center]) ForEach([Employee Key]; [v_vProfit])

then add [v_vProfit] and [v_vProfit_Count] to your table, and then hide the column [v_vProfit]

....

hope this is what you are looking for