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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Parameters in Measures with Multiple Conditions

I need to create a measure that would allow a user to select multiple parameters to move the needle on a visual.

I need them to select:
Report Period
Amount to be removed by a Category  (Foundational, Growth or Unplanned)
Amount to be added by a Category 

 

Is this possible?


Here is my current visual and the measure that drives it

100% Stacked Investment Mix $ = 
VAR allmix = CALCULATE( [Labor Cost], ALL(CEProject[LE Investment Mix]))
RETURN
[Labor Cost]/allmix

Visual.PNG

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I actually ended up created a couple additional measures with calculations pulling from selected parameters that allowed me to do something a little differently but still gets the results.   

 

Again everyone thanks for the ideas!

View solution in original post

8 REPLIES 8
msalahkar
Frequent Visitor

Hi @Anonymous 

 

You need to create two filters - one for period and one for category. Than the user can choose around both of them to get desired result. Here is an example for it.

 

total data

Capture.JPG

 now with filter

 

Capture2.JPG

 I have only used one filter you can use two. Hope it help!!

MFelix
Super User
Super User

Hi @Anonymous,

This is possible you need to setup some slicers with the variable that you want to select and then using SELECTEDVALUE for each variable you can pick up the values from the slicers then just filter the calculation based on the variables.

Can you share a sample of the data and expected results when the slicers are selected?

Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

This is kind of hard to put into a slicer because they want to be able to remove an amount of Labor Cost and then add a new labor cost based on several different scenarios.  So I have it set up that they can get the Labor cost totals they want for removing and adding - Having 3 parameters is the best way for them to play around I think for them to accomplish this.  There are several tables involved in the data behind and the amount they may want to add isn't connected to the table that populates the visual.

 

Anonymous
Not applicable

I did create Measures for Amount to be Removed and Amount to be Added.   So maybe there is way to use those measures in the visual measure based on which Report Period they choose - Would that be easier to figure out?

dax
Community Support
Community Support

Hi @Anonymous , 

You said that you want to "show measure in visual  based on which Report Period they choose", what is relationship betweem measures and report period? If possible could you please inform me more detailed information(such as your expected output and your sample data (by OneDrive for Business))? Then I will help you more correctly.

Please do mask sensitive data before uploading.

Thanks for your understanding and support.
Best Regards,
Zoe Zhi

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

Anonymous
Not applicable

Sorry - I may not have been clear.  I don't want to filter the visuals, I want to change the calculations that drive that visual through parameters or other alternatives.   

I am not allowed to upload anything to the site and our data model is fairly complex to try to show a sampling of demo data would be difficult.   I am afraid I may be looking for a solution that doesn't exist at in Power Bi at this time.

 

Thanks all for the input.

Hi  @Anonymous 

 

What you are trying to achieve is to have for example:

  • Salary is 400K and is 40% of your total costs (1M)
  • Slicer with value to remove 100K to Salary
  • Slicer with value to add an increase of 10% also in salary
  • So the final result would be:
    • Salary 330K
    • Total costs 930 (1M -100K + 30K)
    • Percentage of salary is 35% previously 40%

Is this the result you need to calculate?


Regards

Miguel Félix


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

Proud to be a Super User!

Check out my blog: Power BI em Português



Anonymous
Not applicable

I actually ended up created a couple additional measures with calculations pulling from selected parameters that allowed me to do something a little differently but still gets the results.   

 

Again everyone thanks for the ideas!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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