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
JLambs20
Helper III
Helper III

Change Revenue Numbers based on a Percentage Selected from a Dropdown

Hello,

 

I would like to dynamically change a value based on a percentage that is selected from a dropdown list.  The scenario is that there is a maximum revenue generated per year but then the user has the option to select a percent from a dropdown and have the revenue numbers reflect that.  In other words, if the max revenue generated is $1,000,000 for each year, then a user could select "25%" and then the revenue changes to $250,000 for year 1.  I'm thinking I could pull this off with SELECTEDVALUE in a measure but I'm not entirely certain. I had used SUMX to get my revenue numbers per year in a table but I don't know how to incorporate the percentage aspect. Is this possible?

 

JLambs20_0-1650575375736.png

 


Thank you!

1 ACCEPTED SOLUTION
v-eqin-msft
Community Support
Community Support

Hi @JLambs20 ,

 

According to your description and screenshot, it seems that the fields used for Year slicer and % slicer are from other tables, so I have create a data sample like:

 

Original Table:

Eyelyn9_2-1650959147320.png

Add two tables:

Eyelyn9_0-1650959113809.png  Eyelyn9_1-1650959126159.png

Then please try:

Measure = 
var _selectYears= SUMX(FILTER('Table',[Year] in ALLSELECTED('Select Year'[Year Only])),[Revenue])
var _selePer= SELECTEDVALUE('Select %'[Value])
return _selectYears * _selePer

Output:

Recording 2022-04-26 at 15.52.29.gif

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-eqin-msft
Community Support
Community Support

Hi @JLambs20 ,

 

According to your description and screenshot, it seems that the fields used for Year slicer and % slicer are from other tables, so I have create a data sample like:

 

Original Table:

Eyelyn9_2-1650959147320.png

Add two tables:

Eyelyn9_0-1650959113809.png  Eyelyn9_1-1650959126159.png

Then please try:

Measure = 
var _selectYears= SUMX(FILTER('Table',[Year] in ALLSELECTED('Select Year'[Year Only])),[Revenue])
var _selePer= SELECTEDVALUE('Select %'[Value])
return _selectYears * _selePer

Output:

Recording 2022-04-26 at 15.52.29.gif

 

Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

danextian
Super User
Super User

Hi @JLambs20 ,

You can use a disconnected table that holds the percentages. This can be done by using the Enter Data function or through DAX. You can use GENERATESERIES function to create a table that holds the percentages - example:

Percent Parameter = 
VAR __BASE_TABLE =
    GENERATESERIES ( 0, 1.001, 0.01 )

 

You can then create a measure to multiple a measure based on the value from another table.

Pct Revenue =
SELECTEDVALUE ( 'Percent Parameter'[Value] ) * [Revenue Measure]









Did I answer your question? Mark my post as a solution!


Proud to be a Super User!









"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
davehus
Memorable Member
Memorable Member

Hi @JLambs20 ,

 

This might help. https://drive.google.com/file/d/1MI29v8PazERHYjgXBjN6Yd873SIG7MFW/view?usp=sharing

 

Did I help you today? Please accept my solution and hit the Kudos button.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.