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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
LilMurph
Frequent Visitor

Using What-If modeling parameters

Hi All

 

I have a table where one column specifies the week as 1, 2, 3 etc. Another column specifies a job by specific code i.e. ABC-123, ABC-578, CCA-246 etc. And a third column showing how many hours are remiaining to be worked on that job. So if i took the difference between hours remaining on job ABC-123 from week 7 and week 11, I would know how many hours have been worked on that job in that timeframe. Likewise, if I took the difference of the total hours for all jobs in the same timeframe I would know how many hours have been worked total.

 

I am wanting to use the What-If parameters to set up two sliders so that I can select two different weeks on each slicer and it will give me the difference. For example if I set slider one to 3 and slider two to 7, it would show me the difference between hours for week 3 and week 7. 

 

I am having trouble figuring out how to code this out in Dax as the What-if peramiters are measures and my data is in columns. I hope I am just being foolish and this is easier than it seems.

 

Thanks

LilMurph

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@LilMurph , Based on what I got, Add a What if slicer you will get a measure that will give you what is value

hope weeks is the number

you can create a measure 

sumx(Table, [ParamValue] - Table[Weeks])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@LilMurph , Based on what I got, Add a What if slicer you will get a measure that will give you what is value

hope weeks is the number

you can create a measure 

sumx(Table, [ParamValue] - Table[Weeks])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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