Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

What-if Parameter for Only Selected Values

Hey,   I'm trying to create visualizations for managing project resources and what-if scenarios. I have a table where I have the demand, a table where I have the project names, and a table where I ...
  • v-juanli-msft's avatar
    7 years ago

    Hi Anonymous 

    1.

    Create a new table which has no relationship with other tables

    slicer_project = SELECTCOLUMNS(VALUES(project[project]),"slicer_project",[project])

    Add "slicer_project" in the slicer.

     

    2.

    Create what-if parameter

    this is a measure from "parameter" table

    Parameter Value = SELECTEDVALUE('Parameter'[Parameter])

     

    3.

    create measures in "project" table

    Measure =
    IF (
        SELECTEDVALUE ( slicer_project[slicer_project] ) = MAX ( project[project] ),
        MAX ( demand[demand] ) * ( 1 + [Parameter Value] ),
        MAX ( demand[demand] )
    )
    
    Measure 2 = IF(HASONEVALUE(project[project]),[Measure],SUMX(ALL(project),[Measure]))

    Best Regards
    Maggie

     

    Community Support Team _ Maggie Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.