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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. 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.

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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.