Forum Discussion
Switch From Sum To Count with Radio Button
- Anonymous1 year ago
Hi WilliamMunguti ,
You can do this using bookmarks or DAX, but you mentioned "not on a chart level while creating the visual", so you can only do it via DAX.
Here is my sample data:
Create another table:And use this table to create a slicer:
Use these DAXs to create measures:Sum = SUM('Table'[Value])Count = COUNT('Table'[Value])Output = SWITCH( SELECTEDVALUE(Slicer[Button]), "COUNT", [Count], "SUM", [Sum], [Sum] )And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi WilliamMunguti ,
You can do this using bookmarks or DAX, but you mentioned "not on a chart level while creating the visual", so you can only do it via DAX.
Here is my sample data:
Create another table:
And use this table to create a slicer:
Use these DAXs to create measures:
Sum = SUM('Table'[Value])Count = COUNT('Table'[Value])Output =
SWITCH(
SELECTEDVALUE(Slicer[Button]),
"COUNT", [Count],
"SUM", [Sum],
[Sum]
)
And the final output is as below:
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.