Forum Discussion
Power BI - way to count rows based on conditional formatting
- 1 year ago
Hi Flossiebug
As per my understanding of you requirement i have tried using below dax.
1. Create a calculated column using below dax ( If you want to add some more condition then you can in to that).CancellationCategory =SWITCH(TRUE(),SEARCH("ill", 'Table'[Reason], 1, 0) > 0, "Illness",SEARCH("medication", 'Table'[Reason], 1, 0) > 0, "Medication Issue","Other")2. Create measure and then add that measure into the card and the calculated column use it as a slicer.
------> Use below dax to create dax which calculate as per the slicer.Count =COUNTROWS('Table')
If this answers your questions, kindly accept it as a solution and give kudos.
Hi Flossiebug
As per my understanding of you requirement i have tried using below dax.
1. Create a calculated column using below dax ( If you want to add some more condition then you can in to that).
2. Create measure and then add that measure into the card and the calculated column use it as a slicer.
------> Use below dax to create dax which calculate as per the slicer.
If this answers your questions, kindly accept it as a solution and give kudos.
Oh wow - thank you so much! I've tried your ideas and it has done exactly what I was looking for, thank you so so much. I'm loving finding out what I can do with Power BI and am really grateful to you for taking the time to explain it all so clearly.