Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
My apologies for this very simple question.
I'm wanting to simply know how many times the number 7 appears in the STATUS_ID column. With the formula I currently have, the result is 'FALSE'. I've tried SUM, COUNT etc, I'm not sure which one to use.
The formula I currently have is:
RFMO endorsed total = calculate(count(PB_PRESCRIBED_BURNS[STATUS_ID])="7"+0)
Thanks.
Solved! Go to Solution.
Please try to use below measure:
Measure = CALCULATE(COUNTROWS(Table1),FILTER(Table1,Table1[Values] = 7))
Thanks.
Aiolos Zhao
Proud to be a Super User!
Hi @Ozcoz ,
Please try to use below measure:
test = CALCULATE(COUNTROWS(VALUES(your column)),FILTER(your table,your column = 7))
Aiolos Zhao
Proud to be a Super User!
Thanks for the reply. This is a huge step further than where I was at, however it is only returning a value of 1 or blank. I'm not getting a tally. There are 5 records with '7' as the status ID in the database but it only says 1 on a card with this measure.
My formula looks like this:
RFMO endorsed total = CALCULATE(COUNTROWS(VALUES(PB_PRESCRIBED_BURNS[STATUS_ID])),FILTER(PB_PRESCRIBED_BURNS,PB_PRESCRIBED_BURNS[STATUS_ID] = 7))
Please try to use below measure:
Measure = CALCULATE(COUNTROWS(Table1),FILTER(Table1,Table1[Values] = 7))
Thanks.
Aiolos Zhao
Proud to be a Super User!
Thanks for the solution on this one @AiolosZhao
Further to this, what would the DAX code be to choose multiple slections from the same row?
For example, I want to know the total number of times 7 and 11 appears in the column.
Please try below:
Measure = CALCULATE(COUNTROWS(Table1),FILTER(Table1,Table1[Values] in {7,11}))
or
Measure = CALCULATE(COUNTROWS(Table1),FILTER(Table1,Table1[Values] = 7 || Table1[Values] = 11))
Aiolos Zhao
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
115 | |
100 | |
88 | |
69 | |
61 |
User | Count |
---|---|
151 | |
120 | |
103 | |
87 | |
68 |