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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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