Forum Discussion
Create calculated column from a calculation in a different table
- Anonymous6 years ago
Hi mq2020 ,
Please try to create the following measure to get the flag of every organization with claim:
Org Claiming YN = VAR sumofClaimU = CALCULATE ( DISTINCTCOUNT ( 'User'[User] ), 'User'[User Claimed Y/N] = "y" ) RETURN IF ( sumofClaimU > 0, "Y", "N" )Best Regards
Rena
mq2020 It is a bit of confusing model, what happens if users under an organization have both yes and no, which bucket it will fall or this will never happen? Yes/No it is at a user level and you are viewing the data at org level, so you need to clarify your business rules.
There are many ways to do it but it will depend on your answer above.
Hi parry2k
If 0 users claim-> Organisation Claiming No
If 1 or more than one users claim - Organisation Claiming Yes
Initially I just wanted to fix it my adding a column to the table Organisations to count the number of users claiming for each organisation, then I can add an extra column to do the classification with IF.
It is the count of users claiming that i dont know how to add in the Organisations table - if I could get help with this then that should solve the issue I believe. Thank you so much