Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I need your help in showing the data as per the below table. I was able to achive the same using matrix visual with option "Switch value to rows". I need help in creating Target column and also to have the table header.
Any help is highly apprecia
Metric | Vs. PM | Target | ||
Headcount (Var. Prior Month) | 1 | |||
Attrition (LTM) | 20% | <17% | ||
Attrition (length of service) | -10 | <10% | ||
Attrition (Regretted vs Non Regretted) | ||||
Time to Offer (LTM) | 36 | 43 days | ||
Agency vs Internal (LTM) | 10% | <9% | ||
Open Roles (Var. Prior Month) | -10 |
Solved! Go to Solution.
Hi @DarshanKumar ,
If your actual values (like “Vs Prior Month”) are coming from a measure, then NO, you do not need to create three physical columns in your table.
Here’s what you can do instead:
🧱 1. Create a Supporting Table for Metrics
You’ll still need a single-column table listing your metric names to act as rows in the Matrix:
Go to Modeling → New Table and create:
MetricList = DATATABLE( "Metric", STRING, { {"Headcount (Var. Prior Month)"}, {"Attrition (LTM)"}, {"Attrition (length of service)"}, {"Attrition (Regretted vs Non Regretted)"}, {"Time to Offer (LTM)"}, {"Agency vs Internal (LTM)"}, {"Open Roles (Var. Prior Month)"} } )
Vs_PM_Measure = SWITCH( SELECTEDVALUE(MetricList[Metric]), "Headcount (Var. Prior Month)", [HeadcountVsPrior], "Attrition (LTM)", [AttritionLTM], "Attrition (length of service)", [AttritionLength], "Attrition (Regretted vs Non Regretted)", [AttritionRegret], "Time to Offer (LTM)", [TimeToOffer], "Agency vs Internal (LTM)", [AgencyVsInternal], "Open Roles (Var. Prior Month)", [OpenRolesVsPrior], BLANK() )
(Each [MeasureName] here is your actual measure that already exists.)
Target_Measure = SWITCH( SELECTEDVALUE(MetricList[Metric]), "Attrition (LTM)", "<17%", "Attrition (length of service)", "<10%", "Time to Offer (LTM)", "43 days", "Agency vs Internal (LTM)", "<9%", BLANK() )
Put MetricList[Metric] in Rows
Add Vs_PM_Measure and Target_Measure to Values
In Values pane, turn on “Show on rows” (so columns stack vertically)
You get:
Metric Vs. PM Target
Headcount (Var. Prior Month) | 1 | |
Attrition (LTM) | 20% | <17% |
... | ... | ... |
And this is fully dynamic and driven by your existing measures.
⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together! 🚀 [Explore More]
Hi @DarshanKumar ,
🌟So glad to hear it worked exactly as you needed!
If this solution helped, feel free to click 'Mark as Solution' to guide others too.
Appreciate the kudos👍—it keeps the Power BI community strong and thriving!
🚀Here’s to more powerful, data-driven insights together!🚀
Hi, are you taking about formatting of the column? if that is the case, then you can use the dynamic formatting of the column to show either in number, percentages
I need help in adding additional columnto the matrix.
My actual values(Column name Vs prior month) are coming from the measure, so I need helpw to add the target column to the visual.
Regards,
Darshan
Hi @DarshanKumar ,
To replicate the table structure and formatting from your screenshot in Power BI Matrix visual I would go about it like this.
🧱 1. Design Your Base Table
You need a table (either manually created or from a data source) with 3 key columns:
Metric Vs. PM Target
Headcount (Var. Prior Month) | 1 | |
Attrition (LTM) | 20% | <17% |
Attrition (length of service) | -10 | <10% |
Attrition (Regretted vs Non Regretted) | ||
Time to Offer (LTM) | 36 | 43 days |
Agency vs Internal (LTM) | 10% | <9% |
Open Roles (Var. Prior Month) | -10 |
You can manually create this using "Enter Data" in Power BI.
Once the table is ready:
Go to Visualizations pane → Select the Matrix visual.
Drag:
Metric to Rows.
Vs. PM and Target to Values.
In Values, click on the dropdown → "Show on rows" (to switch values into rows).
Power BI Matrix doesn't allow a native table title row above column headers. But here's a workaround:
Add a Text Box above your Matrix visual.
Enter "Metric", "Vs. PM", "Target" as your header row manually (formatted to match Matrix column width).
Align it precisely above the Matrix.
If you want to define Target values via logic (not static), you can use a measure like:
Target_Measure = SWITCH( TRUE(), SELECTEDVALUE(Metrics[Metric]) = "Attrition (LTM)", "<17%", SELECTEDVALUE(Metrics[Metric]) = "Attrition (length of service)", "<10%", SELECTEDVALUE(Metrics[Metric]) = "Time to Offer (LTM)", "43 days", SELECTEDVALUE(Metrics[Metric]) = "Agency vs Internal (LTM)", "<9%", BLANK() )
Then use Target_Measure in Values instead of static column.
⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together! 🚀[Explore More]
Hi GrowthNatives,
My actual values(Column name Vs prior month) are coming from the measure, do I still need three coulmns in the table
Hi @DarshanKumar ,
If your actual values (like “Vs Prior Month”) are coming from a measure, then NO, you do not need to create three physical columns in your table.
Here’s what you can do instead:
🧱 1. Create a Supporting Table for Metrics
You’ll still need a single-column table listing your metric names to act as rows in the Matrix:
Go to Modeling → New Table and create:
MetricList = DATATABLE( "Metric", STRING, { {"Headcount (Var. Prior Month)"}, {"Attrition (LTM)"}, {"Attrition (length of service)"}, {"Attrition (Regretted vs Non Regretted)"}, {"Time to Offer (LTM)"}, {"Agency vs Internal (LTM)"}, {"Open Roles (Var. Prior Month)"} } )
Vs_PM_Measure = SWITCH( SELECTEDVALUE(MetricList[Metric]), "Headcount (Var. Prior Month)", [HeadcountVsPrior], "Attrition (LTM)", [AttritionLTM], "Attrition (length of service)", [AttritionLength], "Attrition (Regretted vs Non Regretted)", [AttritionRegret], "Time to Offer (LTM)", [TimeToOffer], "Agency vs Internal (LTM)", [AgencyVsInternal], "Open Roles (Var. Prior Month)", [OpenRolesVsPrior], BLANK() )
(Each [MeasureName] here is your actual measure that already exists.)
Target_Measure = SWITCH( SELECTEDVALUE(MetricList[Metric]), "Attrition (LTM)", "<17%", "Attrition (length of service)", "<10%", "Time to Offer (LTM)", "43 days", "Agency vs Internal (LTM)", "<9%", BLANK() )
Put MetricList[Metric] in Rows
Add Vs_PM_Measure and Target_Measure to Values
In Values pane, turn on “Show on rows” (so columns stack vertically)
You get:
Metric Vs. PM Target
Headcount (Var. Prior Month) | 1 | |
Attrition (LTM) | 20% | <17% |
... | ... | ... |
And this is fully dynamic and driven by your existing measures.
⭐Hope this solution helps you make the most of Power BI! If it did, click 'Mark as Solution' to help others find the right answers.
💡Found it helpful? Show some love with kudos 👍 as your support keeps our community thriving!
🚀Let’s keep building smarter, data-driven solutions together! 🚀 [Explore More]
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
63 | |
55 | |
53 | |
36 | |
34 |
User | Count |
---|---|
85 | |
74 | |
55 | |
45 | |
43 |