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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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