Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Muthu
Regular Visitor

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 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

1 ACCEPTED SOLUTION
Eric_Zhang
Employee
Employee


@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.

Capture.PNG

 

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.

View solution in original post

1 REPLY 1
Eric_Zhang
Employee
Employee


@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.

Capture.PNG

 

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.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.