Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

DAX Help needed - Whatif Parameter in Measure returning too many rows in child table

Here is a link to my code -



I have a Whatif slider, Adjusted Hours.  If a number is put into that slider, I want to create a dynamic value from the "Operation Hours" in my Packages table, using a measure.


Revised Hrs =

    IF('Adjusted Hrs'[Adjusted Hrs Value] = 0, SELECTEDVALUE(Packages[Operation Hours]),
        'Adjusted Hrs'[Adjusted Hrs Value])


But as soon as I put the Revised Hrs into my table, it returns all the Packages, instead of using the Filter from the selected Allocation (AllocationID=106)




Please could you help, I've tried so many options?  Calculate, SUMX, trying to find how to do Rowlevel filtering.


I will then be doing the calculation/adjustment in each record of the the PackageDetail child table.


Thank you


Super User
Super User

@dreambeforeyou , Try like


Revised Hrs =

IF( not(isblank('Adjusted Hrs'[Adjusted Hrs Value])) && 'Adjusted Hrs'[Adjusted Hrs Value] = 0, SELECTEDVALUE(Packages[Operation Hours]),
'Adjusted Hrs'[Adjusted Hrs Value])

!! Microsoft Fabric !!
Microsoft Power BI Learning Resources, 2023 !!
Learn Power BI - Full Course with Dec-2022, with Window, Index, Offset, 100+ Topics !!
Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! Proud to be a Super User! !!

Hi Amit,

Thanks so much for looking at my problem.  And yes, I so know I needed to fix the logic of the expression to check for both.  I really appreciate your help.

BUT, my actual issue is that when I use the Measure in my table, it ignores the filter of the Allocation ID and returns all rows.

So I want this, plus the [Revised Hrs]


But instead when I add [Revised Hrs] to the table, I get this:


How do I only return the 5 value for the single row?

Thanks again,

Helpful resources

May 2023 update

Power BI May 2023 Update

Find out more about the May 2023 update.

Submit your Data Story

Data Stories Gallery

Share your Data Story with the Community in the Data Stories Gallery.

Top Solution Authors