Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
In matrix visual , when we specify "column" and some measures in "Values" section , then it considers all measures under column . Instead I want only desired measures to work as per column context and other measures should work as it is .
Below image in yellow highlight is the desired output.
fg
Measures "Total drs met" and "Total calls" should only work under column section. "Gyne","Ortho","Phy" are values of column spec desc.
The other 3 measures should work as it is.
Currently, it shows as per below image: (all the measures under column section)
Solved! Go to Solution.
Hi @jay_patel
You can first refer to the following blogs to learn about how to create a hybrid matrix.
Creating a “custom” or “hybrid” matrix in PowerBI - Microsoft Fabric Community
Advanced 2-Dimensional Table Transformation with DAX | Medium
As the examples in above blogs have only one column level, I create a simple demo which has two column levels as below:
I have a table like below for the column headers.
And you have to create a complex measure to feed the Values section. Here is an example:
Hybrid Measure =
IF (
ISINSCOPE ( 'Table'[Child Metrics] ),
SWITCH (
SELECTEDVALUE ( 'Table'[Child Metrics] ),
"Total Drs", CALCULATE([Total Drs],'Actual Table'[Spec Desc]=SELECTEDVALUE('Table'[Metrics])),
"Total Calls", CALCULATE([Total Calls],'Actual Table'[Spec Desc]=SELECTEDVALUE('Table'[Metrics])),
"",
SWITCH (
SELECTEDVALUE ( 'Table'[Metrics] ),
"Total Doctors Met", [Total Doctors Met],
"Total Doctors Planned", [Total Doctors Planned]
)
)
)
You will have to modify the table and measure according to your model.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!
Hi @jay_patel
You can first refer to the following blogs to learn about how to create a hybrid matrix.
Creating a “custom” or “hybrid” matrix in PowerBI - Microsoft Fabric Community
Advanced 2-Dimensional Table Transformation with DAX | Medium
As the examples in above blogs have only one column level, I create a simple demo which has two column levels as below:
I have a table like below for the column headers.
And you have to create a complex measure to feed the Values section. Here is an example:
Hybrid Measure =
IF (
ISINSCOPE ( 'Table'[Child Metrics] ),
SWITCH (
SELECTEDVALUE ( 'Table'[Child Metrics] ),
"Total Drs", CALCULATE([Total Drs],'Actual Table'[Spec Desc]=SELECTEDVALUE('Table'[Metrics])),
"Total Calls", CALCULATE([Total Calls],'Actual Table'[Spec Desc]=SELECTEDVALUE('Table'[Metrics])),
"",
SWITCH (
SELECTEDVALUE ( 'Table'[Metrics] ),
"Total Doctors Met", [Total Doctors Met],
"Total Doctors Planned", [Total Doctors Planned]
)
)
)
You will have to modify the table and measure according to your model.
Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!