Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Mariollo
Helper I
Helper I

Toggle between absolute values and % - using field parameters

I have a table like below:

Mariollo_0-1728915320944.png

 

 


I would like to use field parameters to toggle between absolute and % values to have second view like below:

Mariollo_1-1728915350953.png

 


For first values I have simple DAX measure

Absolute = COUNT ( Table[product_id] )
 
How can I have % values?
 
 

 

 

 
 

 

 

1 ACCEPTED SOLUTION
_AAndrade
Super User
Super User

Hi @Mariollo,

I'm attaching a pbix file with my solution.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




View solution in original post

6 REPLIES 6
_AAndrade
Super User
Super User

Hi @Mariollo,

I'm attaching a pbix file with my solution.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




Thank you, working as expected

Great.You're welcome.





Did I answer your question? Mark my post as a solution! Kudos are welcome.

Proud to be a Super User!




ajohnso2
Super User
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

SamWiseOwl
Super User
Super User

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 🙂

 
 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.