Forum Discussion
How to count values that satisfy multiple conditions in two columns
- 6 years ago
First you need group data at student level,
Try like
Total Student = sumx(filter(summarize(filter(table,present="Yes"), student, "_tSub",distinctcount(subject)),[_tSub]>=4),[_tSub])Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
First you need group data at student level,
Try like
Total Student = sumx(filter(summarize(filter(table,present="Yes"), student, "_tSub",distinctcount(subject)),[_tSub]>=4),[_tSub])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners/ba-p/890814
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p/881739
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
amitchandak Hello! I think I have a very similar problem, but I can't seem to get your solution to work, i must be missing something very obvious. I have basically the same data model
| Chain | Establishment | Category | Brand | SKU | Is the SKU present |
| Chain1 | POS1 | Category1 | Brand1 | SKU | Yes |
| Chain1 | POS1 | Category1 | Brand2 | SKU | Yes |
| Chain1 | POS1 | Category2 | Brand1 | SKU | No |
| Chain1 | POS1 | Category2 | Brand2 | SKU | Yes |
But I need is the % of POS that have at least one SKU present in each brand. If this was my complete dataset then, I would have 100% in Category 1 and 0% in category2. I tried the recommended way but doesn't show any results:
This is the Measure I'm using: