Forum Discussion
Buttons that change data labels
- 5 years ago
Anonymous If you want them to be able to choose, you'll need to get a little fancy with measures AND bookmark or parameter slicer. If you want to display both, you only need measures.
Create new measures:
Absolute Value = COUNT(Table[SalesDocuments])
Percent = DIVIDE([Absolute Value], CALCULATE([Absolute Value], ALL(Table[Division]))
Create a new table visual, with both measures in it and Division.
Now for the fancy part:
Option A: Slicer
Click 'Enter Data'
Paste this table:
Show Value As Absolute Percent Put Slicer[Show Value As] column in a slicer visual.
Create a new measure:
Value = SWITCH(SELECTEDVALUE(Slicer[Show Value As]), "Absolute", [Absolute Value], "Percent", FORMAT([Percent], "#.00%"), [Absolute Value])Put the [Value] measure in your table and test the slicer.
Option B: Bookmarks
Duplicate the table. Remove [Percentage] from one table and remove [Absolute Value] from the other table. Hide the Percentage table, create a new bookmark, name it 'Absolute Value'. Click the three dots and untick 'data' and 'current page'. Now unhide percentage table and hide absolute value table. Repeat bookmark creation process, but name it 'Percentage'.
Add a button for each bookmark.
Anonymous If you want them to be able to choose, you'll need to get a little fancy with measures AND bookmark or parameter slicer. If you want to display both, you only need measures.
Create new measures:
Absolute Value = COUNT(Table[SalesDocuments])
Percent = DIVIDE([Absolute Value], CALCULATE([Absolute Value], ALL(Table[Division]))
Create a new table visual, with both measures in it and Division.
Now for the fancy part:
Option A: Slicer
Click 'Enter Data'
Paste this table:
| Show Value As |
| Absolute |
| Percent |
Put Slicer[Show Value As] column in a slicer visual.
Create a new measure:
Put the [Value] measure in your table and test the slicer.
Option B: Bookmarks
Duplicate the table. Remove [Percentage] from one table and remove [Absolute Value] from the other table. Hide the Percentage table, create a new bookmark, name it 'Absolute Value'. Click the three dots and untick 'data' and 'current page'. Now unhide percentage table and hide absolute value table. Repeat bookmark creation process, but name it 'Percentage'.
Add a button for each bookmark.
- Anonymous5 years agoNot applicable
I think by doing this I have to do it for all values I want to show in both absolute and total isn't it?
Cause the Sales document mentioned above was just one example of like, 5... there's no "general option" to do it isn't it?
Like, I got an idea but it surely is more effort than to do it for each of the respective columns manually...