Forum Discussion
Create new dynamic measure using slicer settings
Hi community,
This is a tricky one. Appreciate any thoughts or other suggestions to acheive this idea.
I have a sample dataset below. I have a set population for Group A and Group B folks, and I want to create a Group C. But to see what that population may look like, I want to plug and play with the different column headers.
For example: Group A= all Tier 1's, Group B= all Tier 1's with 10+ years runway, Group C= all Tier 1's, with different variations of slicer selections.
Can I create a new measure that will embed the slicers that says, Group B = ([highest level slicer], [runway (years) slicer], [compliance grade slicer], [program participant slicer], [total plans slicer]). And based on what I select in the slicers will dynamically create my Group C?
| ID | Group A | Group B | highest level | runway (years) | compliance grade | program participant | total plans |
| 1 | yes | yes | tier 1 | 11 | F | yes | 3 |
| 2 | yes | no | tier 1 | 7 | F | yes | 4 |
| 3 | no | no | tier 2 | 6 | F | yes | 4 |
| 4 | no | no | tier 2 | 11 | C | yes | 4 |
| 5 | yes | yes | tier 1 | 25 | E | yes | 2 |
| 6 | no | no | tier 3 | 6 | D | yes | 2 |
| 7 | no | no | tier 3 | 8 | C | no | 2 |
| 8 | yes | yes | tier 1 | 10 | G | no | 2 |
| 9 | no | no | tier 3 | 10 | F | yes | 1 |
| 10 | yes | yes | tier 1 | 20 | F | yes | 1 |
| 11 | yes | yes | tier 1 | 15 | G | no | 4 |
| 12 | yes | yes | tier 1 | 10 | C | no | 5 |
Hello mlim0806,
Yes you can achieve this using a dynamic DAX measure. Can you please try the following:
Group C Count = CALCULATE ( COUNTROWS ( YourTable ), YourTable[highest level] = "tier 1", KEEPFILTERS ( VALUES ( YourTable[runway (years)] ) ), KEEPFILTERS ( VALUES ( YourTable[compliance grade] ) ), KEEPFILTERS ( VALUES ( YourTable[program participant] ) ), KEEPFILTERS ( VALUES ( YourTable[total plans] ) ) )
5 Replies
- lbendlinSuper User
Why would you need [Group A] and [Group B]? Why not base your slicers on [highest level] and [runway] choices?
- Sahir_MaharajSuper User
Hello mlim0806,
Yes you can achieve this using a dynamic DAX measure. Can you please try the following:
Group C Count = CALCULATE ( COUNTROWS ( YourTable ), YourTable[highest level] = "tier 1", KEEPFILTERS ( VALUES ( YourTable[runway (years)] ) ), KEEPFILTERS ( VALUES ( YourTable[compliance grade] ) ), KEEPFILTERS ( VALUES ( YourTable[program participant] ) ), KEEPFILTERS ( VALUES ( YourTable[total plans] ) ) ) - v-menakakotaCommunity Support
Hi mlim0806 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
- v-menakakotaCommunity Support
Hi mlim0806 ,
I wanted to check if you had the opportunity to review the information provided Sahir_Maharaj. Please feel free to contact us if you have any further questions. If the response has addressed your query, please accept it as a solution so other members can easily find it.
Thank you.- v-menakakotaCommunity Support
Hi @mlim0806 ,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.