Forum Discussion

jie's avatar
jie
New Member
4 years ago
Solved

Create Matrix chart from table chart

Hi all,   I need your help with this problem. I create a table chart with selected value using selectedvalue function. For example, I have a filter with distincts time zones, when I clic in some o...
  • v-kelly-msft's avatar
    4 years ago

    Hi  jie ,

     

    Create a dim table using all the measure values as the column values,such as below:

    Then create a measure to get what you need:

     

    Measure =
    SWITCH (
        SELECTEDVALUE ( dim[Stimezone] ),
        "Othertimezone",
            CALCULATE (
                SUM ( 'Table'[Value] ),
                FILTER ( 'Table', 'Table'[Stimezone] = "Othertimezone" )
            ),
        "Sametimezone",
            CALCULATE (
                SUM ( 'Table'[Value] ),
                FILTER ( 'Table', 'Table'[Stimezone] = "Sametimezone" )
            )
    )
    

     

    I made a simple sample for reference,pls check attached.

     

    Best Regards,
    Kelly

    Did I answer your question? Mark my reply as a solution!