Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi community,
I have a table in the following format:
person_id | quartile | remission |
1 | Q1 | no |
1 | Q2 | no |
1 | Q3 | yes |
2 | Q1 | no |
2 | Q2 | yes |
2 | Q3 | yes |
3 | Q1 | no |
3 | Q2 | no |
3 | Q3 | no |
Now I want to create a table that shows whether a person has remission in any of the quartiles (so at least 1 yes in Q1,2 or 3).
So this should be the output:
person_id | remission_EVER |
1 | yes |
2 | yes |
3 | no |
Which formula can I use for that?
Thanks!
Solved! Go to Solution.
@im_92 try following measure
Is Yes =
VAR __countRows = CALCULATE ( CCOUNTROWS( Table ), ALLEXCEPT ( Table, Table[person_id] ), Table[Emission] = "Yes" )
RETURN
IF ( __countRows >= 1, "Yes", "No" )
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.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@im_92 , Try
summarize(table,person_id, "remission_EVER", if(calculate(count(Table[quartile]),Table[remission]="Yes")>0,"Yes","No"))
@im_92 try following measure
Is Yes =
VAR __countRows = CALCULATE ( CCOUNTROWS( Table ), ALLEXCEPT ( Table, Table[person_id] ), Table[Emission] = "Yes" )
RETURN
IF ( __countRows >= 1, "Yes", "No" )
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.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
65 |
User | Count |
---|---|
135 | |
118 | |
101 | |
71 | |
61 |