Reply
avatar user
Anonymous
Not applicable
Partially syndicated - Outbound

I have got Mass of some items in both kg & lbs, I wanted to create a 'Mass UoM' field for filters

Mass in Kg and Lbs is present in two separate columns. The Mass UoM filter should give user freedem to choose between Kg and Lbs so that further I can create a measure to display selected unit of mass only.

What logic should I apply to get this new calculated column?

 

 

@tamerj1 

2 ACCEPTED SOLUTIONS
littlemojopuppy
Community Champion
Community Champion

Syndicated - Outbound

Hi @Anonymous 

You could accomplish this in either of two ways.

 

First, you could create a disconnected table that has "Kilograms (Kg)" and "Pounds (Lbs)" as its entries. Stick a slicer on the page with those values as the options.  Then write a measure that is a SWITCH statement for SELECTEDVALUE() of that table.  And use that measure in your visualizations.  This is the way you used to have to do this kind of thing.

 

OR...and I believe this will be much easier...look into field parameters.  They are in preview (last I heard) and I've never used them, but from what you said, they will probably get you where you want to be.  And should be easier to implement.

 

Hope this helps!

View solution in original post

changqing
Resolver II
Resolver II

Syndicated - Outbound

Hi @Anonymous ,

 

You may consider using field parameters. You can parameterize the two fields here:

changqing_1-1660112896009.png

changqing_0-1660112829836.png

You can switch fields (axes/measures) at will. It is very useful!

changqing_2-1660113136505.png

The PBIX file is attached for reference.

PBIX file

Reference:

Let report readers use field parameters to change visuals (preview)

 

Best Regards,
changqing

View solution in original post

2 REPLIES 2
changqing
Resolver II
Resolver II

Syndicated - Outbound

Hi @Anonymous ,

 

You may consider using field parameters. You can parameterize the two fields here:

changqing_1-1660112896009.png

changqing_0-1660112829836.png

You can switch fields (axes/measures) at will. It is very useful!

changqing_2-1660113136505.png

The PBIX file is attached for reference.

PBIX file

Reference:

Let report readers use field parameters to change visuals (preview)

 

Best Regards,
changqing

littlemojopuppy
Community Champion
Community Champion

Syndicated - Outbound

Hi @Anonymous 

You could accomplish this in either of two ways.

 

First, you could create a disconnected table that has "Kilograms (Kg)" and "Pounds (Lbs)" as its entries. Stick a slicer on the page with those values as the options.  Then write a measure that is a SWITCH statement for SELECTEDVALUE() of that table.  And use that measure in your visualizations.  This is the way you used to have to do this kind of thing.

 

OR...and I believe this will be much easier...look into field parameters.  They are in preview (last I heard) and I've never used them, but from what you said, they will probably get you where you want to be.  And should be easier to implement.

 

Hope this helps!

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)