Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I have a table like below:
I would like to use field parameters to toggle between absolute and % values to have second view like below:
For first values I have simple DAX measure
Solved! Go to Solution.
Hi @Mariollo,
I'm attaching a pbix file with my solution.
Proud to be a Super User!
Hi @Mariollo,
I'm attaching a pbix file with my solution.
Proud to be a Super User!
Thank you, working as expected
Great.You're welcome.
Proud to be a Super User!
If you have access to the model you could create a static table via 'Enter Data'.
Lets call the table 'Display Mask'
Add a column and name it 'Display'
Add a value 'Absolute'
Add another value '%'
Save and exit power query to apply the changes.
You should have 2 measures already created (if not you should do this first)
1 measure will hold the Absolute value
the other measure in %
You will then create a new measure, lets call it 'User Preference' and define it as below.
User Preference =
VAR _SelectedDisplay = SELECTEDVALUE('Display Mask'[Display],"Absolute") (Default selection will be abs if nothing selected)
VAR _Abs = [Absolute Value]
VAR _% = [% Value]
RETURN
SWITCH(
TRUE(),
_SelectedDisplay = "Absolute", _Abs,
_SelectedDisplay = "%", _%
)
N.B Be sure to drop the column from your new table into your report as a slicer
Hi @Mariollo
You can remove the filter using the Calculate function
Absolute % =
COUNT ( Table[product_id] )
/
Calculate( COUNT ( Table[product_id] ), AllSelected(Table[range_column]))
If you are happy with this answer please mark as a solution for others to find !
Kudos are always appreciated! Check out our free Power BI video courses.
Thank you, this is also working 🙂
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
77 | |
74 | |
57 | |
39 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |