cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Shinu1
Helper II
Helper II

To show multiple measure columns based on slicer selection in matrix

Hi,

I'm looking for help to add multiple measure columns into matrix table based on slicer selection

I have a slicer table named 'tbl_KPI', as shown below

KPI

External Revenue
Total Revenue
Total Cost
Contribution Margin
CM %
Variance

 

 

Now based on multiple selectios in slicer, the matrix table should only show populate columns for respective measures.

Example:  If user has selected "External Revenue" and "CM%" in slicer, the  matrix  should show as per the below table

 

RegionsExternal RevenueCM %
A11112.1%
B22265.6%
C33322.8%
D44477.4%
Toal111044.5%

 

I already have created measures for respective selections but not sure how to develop a measure to incorporate the above requirement.

 

I tried the following measure, but it did not work as per expectations

 

MeasureKPI = SWITCH(ALLSELECTED(tbl_KPI[KPI]),"External Revenue",sum('Raw Data'[External Revenue]),"Total Revenue",[Total Revenue],"Total Cost",[Total Cost],"CM %",[CM %],0)
 

Thanks in advance 

Shinu

 
4 REPLIES 4

Solutions provided on those links dosen't help.

@Shinu1 

 

You may refer to the post below.

https://community.powerbi.com/t5/Desktop/How-to-hide-null-columns-in-matrix-table/m-p/562296#M265307

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

The solution provided on the link is what i have already implemented but that does not help in showing multiple measures on slicer selection.

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Top Solution Authors