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.
I have a lot of calcuations that depend on user input so I need parameters. Most of the parameters are Yes/No questions, for example, include Lunch in Calculations? If yes, then the calculation would deduct lunch hours from the total and if no, it would not. More like that. The way I've done parameters is on the Modeling tab, What-if Parameter, but I see these are only used for numbers. So I also read about Manage Parameters from the Query Editor window. Is this where I would create my parameters? And if so, how would I then add them to my report to get the answer, and use the answer in the cacluations?
Solved! Go to Solution.
Hi @Anonymous ,
Maybe you can do like this.
1. Create a table.
2. Create a slicer.
Measure =
IF(
SELECTEDVALUE('Table'[Parameter]) = "Yes",
[Total Worked] + [Lunch Break],
[Total Worked]
)
Or create a ‘What If’ parameter and use the numbers 0, 1 instead of ‘Yes’ and 'No'.
If the problem is not resolved, please show me sample data.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
I think you will need to add some sample data and screenshots to your query. It's hard tounderstand how you are rrying to use parameters and in what scenario.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks,
Pragati
Well for example I need a parameter, Include Lunch? Yes/No. The formula would look like:
Total Hours = IF(Lunch Parameter = "YES", [Total Worked] + [Lunch Break], [Total Worked])
Just something simple like that.
Hi @Anonymous ,
Maybe you can do like this.
1. Create a table.
2. Create a slicer.
Measure =
IF(
SELECTEDVALUE('Table'[Parameter]) = "Yes",
[Total Worked] + [Lunch Break],
[Total Worked]
)
Or create a ‘What If’ parameter and use the numbers 0, 1 instead of ‘Yes’ and 'No'.
If the problem is not resolved, please show me sample data.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
95 | |
94 | |
80 | |
71 | |
64 |
User | Count |
---|---|
115 | |
106 | |
96 | |
81 | |
72 |