The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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?
Solved! Go to Solution.
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!
Hi @Anonymous ,
You may consider using field parameters. You can parameterize the two fields here:
You can switch fields (axes/measures) at will. It is very useful!
The PBIX file is attached for reference.
Reference:
Let report readers use field parameters to change visuals (preview)
Best Regards,
changqing
Hi @Anonymous ,
You may consider using field parameters. You can parameterize the two fields here:
You can switch fields (axes/measures) at will. It is very useful!
The PBIX file is attached for reference.
Reference:
Let report readers use field parameters to change visuals (preview)
Best Regards,
changqing
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!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
78 | |
71 | |
52 | |
50 |
User | Count |
---|---|
123 | |
119 | |
76 | |
64 | |
60 |