Forum Discussion
TomSinAA
3 years agoHelper IV
dax help
I have data in a table like this:
| Category | Area | Requirement |
| Cat1 | R1 | 1 |
| Cat1 | R1 | |
| Cat1 | R2 | |
| Cat1 | R3 | 2 |
| Cat1 | R4 | 3 |
| Cat1 | R5 |
I want to create a visual that shows the number and percent of Areas that do not have a requirement. So something like this:
| Area | Count of Areas with no requirement | % | Count of Areas with requirement | Total | % | |
| Cat1 | 2 | 40% | 3 | 60% | 5 | 100 |
Not sure if how to approach it.
Perhaps this is naiive, but I would start by creating some measures:
Total Areas = DISTINCTCOUNT(YourTableName[Area])Areas with Requirement = Calculate(DISTINCTCOUNT(YourTableName[Area]),YourTableName[Requirement]>0)
Areas without Requirement = [Total Areas] - [Areas with Requirement]
Areas with Requirement% = DIVIDE([Areas with Requirement],[Total Areas])Areas without Requirement% = DIVIDE([Areas without Requirement],[Total Areas])
Total% = 1
1 Reply
- Chris_WhiteResolver II
Perhaps this is naiive, but I would start by creating some measures:
Total Areas = DISTINCTCOUNT(YourTableName[Area])Areas with Requirement = Calculate(DISTINCTCOUNT(YourTableName[Area]),YourTableName[Requirement]>0)
Areas without Requirement = [Total Areas] - [Areas with Requirement]
Areas with Requirement% = DIVIDE([Areas with Requirement],[Total Areas])Areas without Requirement% = DIVIDE([Areas without Requirement],[Total Areas])
Total% = 1