Forum Discussion
How to use a dynamic string variable
- Anonymous6 years ago
Hi Anonymous ,
Please try to create a calculated column with below formula to replace the original measure:
Column = VAR _topclient = CALCULATE ( MAX ( 'Well List'[Operator] ), FILTER ( ALL ( 'Well List' ), 'Well List'[WellID] = MAX ( 'Well List'[WellID] ) ) ) RETURN IF ( 'Well List'[Operator] = _topclient, 1, 0 )Best Regards
Rena
Hi Anonymous ,
Thanks for your answer, i already tried that way before with the result but, i see in your example you have two "JJ", so basically how would you add the 1 value in all the JJ's in the column?
Anonymous Anonymous solution should work, not sure why is not showing 1 for each JJ operator, I created sample data and used following measure
Top Operator =
VAR __topId = CALCULATE ( MAX ( Well[Id] ), ALL ( Well ) )
VAR __topOpertor = CALCULATE ( MAX ( Well[Operator] ), Well[Id] = __topId )
RETURN IF ( MAX ( Well[Operator] ) = __topOpertor, 1, 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.⚡