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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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.
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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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