Forum Discussion
2 individual matrix side by side
- 11 months ago
Answered this question here - Solved: Re: How to align multiple tables and create dynami... - Microsoft Fabric Community
Hi,
Share the download link of the Excel file with your formulas written there so that i can understand how you arrived at those results. I will convert those formulas into DAX measures.
If possible can Jihwan_Kim super user look into this for me, can't upload real dataset, so adding random numbers. Business requirement is to show previous year ratio which is numer/deno by section, classroom, for which i built baseratio column has calculation Numer/Deno, next 3 columns needs to have dynamic headers for last 3 months in MMM-YY format, for dynamic header built Last3months table. last column needs to be YTD. I built 3 matrixes same as we do in tableau and put aligned the all 3 matrixes side by side but in PBI it is showing space between matrix. As Super User suggested to use calculation group which erase the usage of individual matrix table. Sample data (RandomNumbers), FinalTableFormat Expected(RandomNumbers)
| Section | PrevYr | Jun-25 | Jul-25 | Aug-25 | YTD |
| class R | 4.5 | 5.7 | 4.5 | 2.3 | 3.4 |
| class AP | 3.4 | 6.9 | 3.4 | 2.5 | 4.6 |
| class HE | 2.5 | 3.8 | 2.9 | 2.4 | 1.4 |
| class NM | 5.8 | 2.5 | 1.8 | 2.5 | 2.3 |
| class N | 7.5 | 2 | 3.9 | 3.9 | 2.5 |
| Section | ClassRoom | YearMnth | DENO | NUMER |
| class AP | class A | 202506 | 2 | 23 |
| class AP | class A | 202506 | 1 | 48 |
| class R | class A | 202506 | 5 | 33 |
| class R | class A | 202507 | 8 | 71 |
| class NM | class A | 202506 | 2 | 17 |
| class NM | class A | 202506 | 1 | 10 |
| class HE | class A | 202506 | 5 | 50 |
| class HE | class A | 202506 | 1 | 7 |
| class N | class A | 202506 | 1 | 10 |
| class N | class A | 202506 | 2 | 6 |
Report Date =
DATE (
DIVIDE ( 'test'[YearMnth], 100, 0 ), -- Year
MOD ( 'test'[YearMnth], 100 ), -- Month
1 -- First day
)
Measure :
BaseRatio =
DIVIDE (
SUM ( 'test'[NUMER] ),
SUM ( 'test'[DENO] )
)
Disconnected Table :-
Last3Months =
VAR MaxMonth = EOMONTH(TODAY(), -1) // last month
RETURN
ADDCOLUMNS(
CALENDAR(EOMONTH(MaxMonth,-2)+1, MaxMonth),
"MMM-YY", FORMAT([Date], "MMM-yy")
)
Calculation group :-
condition =
VAR _previousyear =
MAXX (
FILTER ( ALL ( 'calendar' ), 'calendar'[Date] = TODAY () ),
'calendar'[Year]
) - 1
RETURN
SWITCH (
TRUE (),
MAX ( 'calendar'[Year] ) = _previousyear
&& NOT ISINSCOPE ( 'calendar'[Month-Year] ), CALCULATE ( SELECTEDMEASURE (), 'calendar'[Year] = _previousyear ),
ISINSCOPE ( 'calendar'[Month-Year] ),
VAR _t =
FILTER (
ALL ( 'calendar'[Month-Year sort], 'calendar'[Month-Year] ),
'calendar'[Month-Year sort] <= TODAY ()
)
VAR _last3months =
WINDOW ( 1, ABS, 3, ABS, _t, ORDERBY ( 'calendar'[Month-Year sort], DESC ) )
RETURN
CALCULATE ( SELECTEDMEASURE (), KEEPFILTERS ( _last3months ) )
)
- Ashish_Mathur11 months agoSuper User
Answered this question here - Solved: Re: How to align multiple tables and create dynami... - Microsoft Fabric Community
- Anonymous11 months agoNot applicable
Hi leodec11 ,
Thank you Ashish_Mathur , for your workable solution,
leodec11 please go through the URL shared by Ashish mathur, it will be solve your issue.
Thanks,
Akhil.- Anonymous11 months agoNot applicable
Hi leodec11 ,
Did you get a chance to review the link provided? Let us know if that resolves your issue or if you are still facing any challenges.
Thanks,
Akhil.