Forum Discussion

annjoseph's avatar
annjoseph
Regular Visitor
6 years ago
Solved

What if parameter

I have sales table with Product Group name,Product Sub group name,Volume, Price.

I created a Matrix with Product Group name and Product Sub group in rows and volume and price in Values.Then i have created what if Parameter for volume.based on selected value in What if, Volume in matrix will change.

but i have new requiremnt, such that what if Volume for each product will vary.

Example.if i have 3 products, book, table and pen. what if volume change for book will be 5%, pen will be 10%, for pencil no change.Need to show all the variation together in a Matrix.

How can i implement above requirement?

  • Hi annjoseph ,

     

    If the ratio of changes between products is fixed, then amitchandak solution is indeed effective.

    Otherwise you may need to create multiple ‘What if’ parameters.

     

    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.

  • Hi annjoseph ,

     

    Measure = 
    SWITCH(
        SELECTEDVALUE(Sales[CountryRegion]),
        "China", SUM(Sales[Sale 2013]) * [Parameter1 Value],
        "Germany", SUM(Sales[Sale 2013])*[Parameter2 Value],
        "United", SUM(Sales[Sale 2013])*[Parameter3 Value]
    )

    You need to create multiple 'What-IF' parameters, otherwise, you need use bookmark feature.

     

    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.

5 Replies

  • annjoseph , you can have more than one whatif or /with a measure like this

     

    new measure =
    switch ( true(),
    FIRSTNONBLANK(Table[Product],"NA") ="book" , [Measure] * selectedvalue(param[param]),
    FIRSTNONBLANK(Table[Product],"NA") ="table " ,[Measure] *selectedvalue(param[param]) *2 ,
    /// Add more conditions
    [Measure]
    )

     

    new measure =
    switch ( true(),
    FIRSTNONBLANK(Table[Product],"NA") ="book" , [Measure] * selectedvalue(param1[param1]),
    FIRSTNONBLANK(Table[Product],"NA") ="table " ,[Measure] *selectedvalue(param2[param2]) ,
    /// Add more conditions
    [Measure]
    )

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi annjoseph ,

     

    If the ratio of changes between products is fixed, then amitchandak solution is indeed effective.

    Otherwise you may need to create multiple ‘What if’ parameters.

     

    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.

    • annjoseph's avatar
      annjoseph
      Regular Visitor

      Thanks for the reply. Hard coding measures wont work for our requirement.

      As per our requirement, we need to find the What-If Solution for each product based on what-if parameter. I will be having one what-if parameter & when i select one product i should be able to apply the what-if condition to that product . Then, that product's value should be changed to what-if condition. Similarly I should be able to apply different what-if condition for each products based on my selection. Final results will be a table of all products selected with changed values and un-selected products with unchanged values. The whole process should be dynamic.

      • v-lionel-msft's avatar
        v-lionel-msft
        Community Support

        Hi annjoseph ,

         

        Measure = 
        SWITCH(
            SELECTEDVALUE(Sales[CountryRegion]),
            "China", SUM(Sales[Sale 2013]) * [Parameter1 Value],
            "Germany", SUM(Sales[Sale 2013])*[Parameter2 Value],
            "United", SUM(Sales[Sale 2013])*[Parameter3 Value]
        )

        You need to create multiple 'What-IF' parameters, otherwise, you need use bookmark feature.

         

        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.