Forum Discussion

Muthu's avatar
Muthu
Regular Visitor
8 years ago
Solved

dynamic matrix with slicer

Hi, How can I show the matrix values dynamically for all Region, all Branch and all Area Officer by selecting a slicer values like Region, Branch and Area officer in Power BI report.   e.g If I se...
  • Eric_Zhang's avatar
    8 years ago

    Muthu wrote:

    Hi,

    How can I show the matrix values dynamically for all Region, all Branch and all Area Officer by selecting a slicer values like Region, Branch and Area officer in Power BI report.

     

    e.g If I select Region slicer value then the matrix should display the all the columns from Table1 in which includes Region, few columns and few measures.  Similarly for Branch and AO it should show according to the slicer selection.

     

    Thanks for your help!!

     

    Thanks,

    Muthu


    Muthu

    You may have to create an auxiliary table as below used in the slicer.

     

    Then create a measure like

    MEASURE =
    SWITCH (
        TRUE (),
        HASONEVALUE ( slicerTbl[category] )
            && MAX ( slicerTbl[category] ) = "Region", [region value measure],
        HASONEVALUE ( slicerTbl[category] )
            && MAX ( slicerTbl[category] ) = "Branch ", [Branch value measure],
        [Area Officer value measure]
    )
    

    For further advice, please post some sample data and expected output.