Forum Discussion
Average per ID
Hi all,
I have a table which contains mulitple rows with same id's, each row has a text with FAILED or PASSED.
For example:
| ID | Result |
| 1 | FAILED |
| 2 | FAILED |
| 1 | PASSED |
| 2 | FAILED |
| 1 | FAILED |
| 3 | PASSED |
How can I show the average PASSED or FAILED per ID, so I can see for exmaple ID 1 is for 75% passed.
Hi Anonymous ,
How do you get to 75% passed for ID = 1? 🙂
Here maybe something that could help you:
Here the DAX code for the Measure above
AverageMeasurePassed = DIVIDE ( CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Result] = "PASSED" ), CALCULATE ( COUNTROWS ( 'Table' ), REMOVEFILTERS ( 'Table'[Result] ) ) ) + 0Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
2 Replies
- tackytechtom
Most Valuable Professional
Hi Anonymous ,
How do you get to 75% passed for ID = 1? 🙂
Here maybe something that could help you:
Here the DAX code for the Measure above
AverageMeasurePassed = DIVIDE ( CALCULATE ( COUNTROWS ( 'Table' ), 'Table'[Result] = "PASSED" ), CALCULATE ( COUNTROWS ( 'Table' ), REMOVEFILTERS ( 'Table'[Result] ) ) ) + 0Let me know if this helps 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/ - AnonymousNot applicable
It worked!
I have an additional question:
now that I have the average per ID, (Each ID is connected/related to a category) I want to show with a stacked column chart that the ID 1 is in a range of for example 75%-100%.
So I want to see 4 stacked column (range 0-25%, 26-50%, etc) and in each column you can see the different categories based on the percentaged passed.