Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

create a new % Change column to compare values based on multiple slicers including on the same field

Hi there,   I am trying to figure out how to have a table visual with a column which updates based on multiple slicer selections.   So far, I've got two table visuals showing the Boroughs of Lond...
  • v-chenwuz-msft's avatar
    4 years ago

    Hi Anonymous ,

     

    Do you have two watches? A fact table and a prediction table or a prediction and a fact table in the same table?
    Assume that they are in the same table. You need create a new table for the second year slicer. Then use the following measure to do calculate %:

    Measurde =
    VAR _1 =
        CALCULATE (
            SUM ( 'Table'[values] ),
            FILTER ( ALL ( 'Table'[year] ), [year] = SELECTEDVALUE ( 'Year'[year] ) )
        )
    RETURN
        IF (
            ISBLANK ( SELECTEDVALUE ( 'Year'[year] ) ),
            "please select one",
            FORMAT (
                DIVIDE ( _1 - SUM ( 'Table'[values] ), SUM ( 'Table'[values] ) ),
                "#.0%"
            )
        )
    

     

    Result:

     

     

    Pbix in the end you can refer.

    Best Regards

    Community Support Team _ chenwu zhu

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.