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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sajal161292
Helper V
Helper V

need to use a Radio Button in power bi visual

Hi,

 

I have a requirement to convert the units quanity into dollars using a selling price.

 

However there is a condition to do so like this:

 

There should be a dropdown which has units,dollars as options.

Upon clicking the units button all the values in the dashbaord should contain the quantity in units.

Upon clicking the dollars button all the values in the dashboard should contain the dollars value associated with the same units.

 

Is there any way of achieving it in Power BI?

6 REPLIES 6
Greg_Deckler
Super User
Super User

Sounds like you need a measure that displays the correct information based upon the selection in the drop down. This would be an implementation of the disconnected table trick....use the Disconnected Table Trick as this article demonstrates: https://community.powerbi.com/t5/Community-Blog/Solving-Attendance-with-the-Disconnected-Table-Trick...


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi,

 

Thank you for your help!

 

Actually i have 10 KPIs in the dashboard.

 

So there are 10 KPIs for units and 10 KPIs for dollars.

 

These field Units and Dollars are user defined fields and they don't exist in the database.

So when any business user selects Units then all the KPIs corresponding to the units should get displayed and similarly  when user selects Dollars then all the KPIs should display for the dollars..

Right, so generally you create a disconnected table with two rows:

 

Choices (this is the name of the table)

Choice (this is the name of the column)

Units

Dollars

 

Then you create a new KPI measure for each of your 10 KPI's that is essentially:

 

KPI = IF(HASONEVALUE(Choices[Choice]),IF(MAX(Choices[Choice]) = "Units",[Units KPI],[Dollars KPI]),[Units KPI])

Basically, check if there is a single value seleced. If so, then if it is "Units", display the Units KPI, else display the Dollars KPI otherwise default to the Units KPI if the user hasn't selected anything. You would have one of these for each of your KPI's and use these KPI's in your visuals instead of the individual units or dollars KPI's.


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi,

 

Thank you so much for your help!

It worked perfectly for me 🙂

 

@sajal161292,

 

Glad to hear that. You may help accept the solution above. Your contribution is highly appreciated.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Sure!!

 

Just one more thing.

I need to represent the dollars value like $xxx in my visual.

Since i am using a KPI for showing the value in units and dollars based upon a selection,then if I change the format of the measure to $ then it shows the units value also with $ sign which i don't want

So is there any way of avoiding $ in units ans showing it only for dollars?

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

Top Solution Authors