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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Help with Parameters

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?

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

Maybe you can do like this.

1. Create a table.

v-lionel-msft_0-1602146436067.png

2. Create a slicer.

v-lionel-msft_1-1602146474413.png

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.

 

 

 

 

View solution in original post

3 REPLIES 3
Pragati11
Super User
Super User

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

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

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.

v-lionel-msft_0-1602146436067.png

2. Create a slicer.

v-lionel-msft_1-1602146474413.png

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.

 

 

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors