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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
miracle2023
Helper I
Helper I

Need help in selecting rows for what-if parameter

Hi,

My end goal is to give an user the ability to select rows and apply what-if parameter for it. 

So far I can select rows and apply what if parameter for cases delivery. However, Running_Total returns blank when parameter slicer filters are selected,

Cases delivery formula consists allocation that user is able to change - so -4.40 returns smaller handled cases.

I have a single relationship between parameter values and indexcolumn as well. 

Screenshot 2023-11-14 090537.png

whatifparameter2.png

I would appreciate any help.

Thank you

 

2 REPLIES 2
amitchandak
Super User
Super User

@miracle2023 , You can use what if parameter in a measure. On the selected row, you can not apply it. What you have selected will get filtered on other visual, there you can use isfiltered in measure and then use what if parameter

 

The information you have provided is not making the problem clear to me. Can you please explain with an example.

Appreciate your Kudos.

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi,

Thank you for your answer.

Im trying to build forecast based on due cases and people's allocation towards tasks and their handling times. Allocation and handling times are two "what-if parameters" that directly impact cases delivery column. Another what if parameters are supposed to use for selecting rows in which we can apply allocation and handling times. For selecting rows, I built two index columns from 1 to 12, (current month is blank and next is 1 etc) and made a single relationship between them. 

P.S seems I got my error and everyting works so far. 

I made inactive relationships between index columns and parameters and built following queries for cases delivery. Also cleander up running total measure. 

HighRisk_Delivery =
VAR measure1 =
    CALCULATE (
        ( 115.5 * [nrow_Allocation_OEDD(Used)] ) / [nrow_AHT_OEDD(Used)],
        USERELATIONSHIP ( dimDate[Indexcolumn2], 'Nrow Allocation'[Nrow Allocation] ),
        USERELATIONSHIP ( dimDate[Indexcolumn], 'Nrow Handling Times'[Parameter] )
    )
VAR measure2 =
    CALCULATE ( ( 115.5 * [Allocation OEDD(Used)] ) / [6M_AVGAHT_OEDD(Used)] )
RETURN
    IF (
        SELECTEDVALUE ( 'Nrow Allocation'[Nrow Allocation] )
            || SELECTEDVALUE ( 'Nrow Handling Times'[Parameter] )
            || SELECTEDVALUE ( 'Nrow Handling Times'[Parameter] )
            || SELECTEDVALUE ( 'Allocation OEDD'[OEDD Parameter] ),
        measure1,
        measure2
    )

Mediumrisk_Delivery =
VAR measure1 =
    CALCULATE (
        ( 115.5 * [nrow_Allocation_ODD(Used)] ) / [nrow_AHT_ODD(Used)],
        USERELATIONSHIP ( dimDate[Indexcolumn2], 'Nrow Allocation'[Nrow Allocation] ),
        USERELATIONSHIP ( dimDate[Indexcolumn], 'Nrow Handling Times'[Parameter] )
    )
VAR measure2 =
    CALCULATE ( ( 115.5 * [Allocation ODD (Used)] ) / [6M_AVGAHT_ODD(Used)] )
RETURN
    IF (
        SELECTEDVALUE ( 'Nrow Allocation'[Nrow Allocation] )
            || SELECTEDVALUE ( 'Nrow Handling Times'[Parameter] )
            || SELECTEDVALUE ( 'Nrow Handling Times'[Parameter] )
            || SELECTEDVALUE ( 'Allocation OEDD'[OEDD Parameter] ),
        measure1,
        measure2
    )

Delivery_of_cases = SWITCH(SELECTEDVALUE(dimRisk[RiskCustom]),
"Medium/Low", [Mediumrisk_Delivery],
"High", [HighRisk_Delivery],
[SumDeliveries])

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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