Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am trying to migrate a Tableau dashboard to Power BI, and I’m having difficulty building the tables in the desired format.
I currently have 3 separate tables:
When I place these 3 tables side by side on the Power BI page, empty space appears between them, and alignment becomes difficult.
I also tried creating a calculation group with 3 columns (PreviousYrRatio, Last 3 Months, YTD), but the issue is that the “Last 3 Months” values appear as a single column instead of showing 3 dynamic month columns with headers.
Question:- How can I build this in Power BI so that the 3 sections (classroom,section,PreviousYrRatio, Jun-25, Jul-25, Aug-25, YTD) appear in one aligned table, with the last 3 months shown as separate dynamic columns?
Solved! Go to Solution.
Hi,
This is a start
Hi,
Click on the hierarch symbol.
Hi @leodec11
What you are trying to replicate is essentially a single pivot-style matrix where different measures (PreviousYrRatio, YTD) sit alongside dynamic month columns, but Power BI doesn’t allow you to simply stitch three independent visuals together without spacing or alignment issues. Placing separate tables side by side leads to the gaps you’re seeing, and calculation groups alone won’t create multiple dynamic columns—they return one column at a time. The best practice here is to restructure your model so that you can use a single Matrix visual: keep Classroom and Section as row headers, then unpivot your measures so that you can display them in columns. For the “Last 3 Months,” you can create a measure that returns values for the current month, prior month, and two months back, then use a disconnected Date table or a DAX pattern with SELECTEDVALUE/SWITCH to generate separate measures for each month, ensuring they appear as three distinct dynamic columns with proper headers (e.g., Jun-25, Jul-25, Aug-25). In other words, you’ll need to align everything in one Matrix visual with carefully designed DAX measures or a combination of calculation groups and measure branching, rather than trying to combine multiple visuals. This way, the final output is a single table with Classroom, Section, PreviousYrRatio, each of the last 3 months as separate columns, and YTD, all properly aligned.
@leodec11 Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882
Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
Sample data is in the format
| YRMNTH | spec | numer | deno |
| 202402 | IT | 2 | 10 |
| 202506 | FP | 3 | 24 |
| 202506 | FP | 4 | 32 |
| 202402 | IT | 2 | 12 |
| 202507 | FP | 1 | 45 |
| 202506 | IT | 2 | 12 |
| 202508 | FP | 3 | 23 |
Result Expected where jun-2025, jul-2025,aug-2025 is dynamic column header showing last 3 months from current date. Basic calculation is numer/deno for each spec
| spec | PreviousYear | Jun-2025 | Jul-2025 | Aug-2025 | YTD |
| FP | 0 | 0.125 | 0.0222 | 0.13 | 0.088 |
| IT | 0.18 | 0.16 | 0 | 0 | 0.16 |
Hi @Ashish_Mathur, thanks for sharing the pbix file, i am able to replicate the calculations but while displaying i am getting column as spec, ratio PY, Ratio, Ratio YTD in your pbix file as well.. can you tell how did you create the matrix table, it might be i missed something. see the screenshot attached.
Hi,
Click on the hierarch symbol.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.