Forum Discussion
Anonymous
6 years agoNot applicable
Calculation Woe with a filter
Hi Team,
I have the following measure:
# of Shares = IF([STIP on Performance]>=1500,ROUNDDOWN(DIVIDE([STIP on Performance],'Stock Price'[Stock Price Value]),0),0)
The above measure states if the STIP Performance is >=$1500 then calculate the number of shares based on the STIP on Performance measure divided by the Stock Price value, otherwise it's 0. The reason is if their bonus is >=$1500 it gets paid in shares, otherwise they will get a cash bonus if less than $1500 which returns 0 -- this measure works as needed.
However I'm stuck on how to add a country condition too, if the country is also China, I want it to also return to 0 because their full bonus amount will be in cash. I was trying to do something like below but it wasn't working:
# of Shares (version 2) = var con1 = IF(
[STIP on Performance]>=1500,ROUNDDOWN(DIVIDE([STIP on Performance],'Stock Price'[Stock Price Value]),0),0)
var con2 = IF(FILTER(Rosters, Rosters[Country] = "China"),0, con1)
I'm so stuck on how to do this. Any help would be great please.
Thanks so much!!
Anonymous try this
# of Shares = IF([STIP on Performance]>=1500 && MAX ( Table[Country] ) <> "China" ,ROUNDDOWN(DIVIDE([STIP on Performance],'Stock Price'[Stock Price Value]),0),0)I would β€ Kudos if my solution helped. π If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
β‘Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.β‘
2 Replies
- parry2k
Super User
Anonymous try this
# of Shares = IF([STIP on Performance]>=1500 && MAX ( Table[Country] ) <> "China" ,ROUNDDOWN(DIVIDE([STIP on Performance],'Stock Price'[Stock Price Value]),0),0)I would β€ Kudos if my solution helped. π If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
β‘Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.β‘
- AnonymousNot applicable
Yaas! It worked. Thanks so much! π