Forum Discussion
Accessible Reporting - Convert Matrix to Table, using Calculation Groups?
- 1 year ago
Hi Anonymous ,
You are absolutely right to look for a more accessible alternative - however, DAX does not support dynamic column names in a calculated table. This means we can't label columns like "July", "August", etc. based on date logic.
Instead, the best approach is to return rows with dynamic month labels and use a table visual, which is screen reader friendly.
Here’s a simplified calculated table that does this:
FlattenedClientReach =
VAR MaxMonthID = MAX('01b: Calendar'[Month Year ID])
RETURN
SELECTCOLUMNS(
ADDCOLUMNS(
GENERATE(
'AT - CLIENT REACH',
VAR Client = 'AT - CLIENT REACH'[Client ID]
RETURN
FILTER(
ADDCOLUMNS(
'01b: Calendar',
"ReachValue",
CALCULATE(
'AT - CLIENT REACH'[Measures - Client Reach],
'AT - CLIENT REACH'[Client ID] = Client
)
),
'01b: Calendar'[Month Year ID] > MaxMonthID - 12 &&
'01b: Calendar'[Month Year ID] <= MaxMonthID
)
),
"MonthName", FORMAT('01b: Calendar'[Date], "MMM YYYY")
),
"Client", [Client ID],
"Month", [MonthName],
"ClientReach", [ReachValue]
)If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thank you.
Hi Anonymous ,
Thank you for your Response..!!
Yes, if you're looking to display values by Month and Financial Year in a flattened table format (with one column per month), then you will need to create a column for each unique combination of Month and Year - like July 2024, August 2024, ..., June 2025.
You can do this by slightly modifying the calculated table DAX to include the full Month-Year in each column header. For example:
FlattenedClientReach =
ADDCOLUMNS(
'Metrics',
"Jul 2024", CALCULATE(SUM('YourDataTable'[Value]), 'Date'[Month] = 7, 'Date'[Year] = 2024),
"Aug 2024", CALCULATE(SUM('YourDataTable'[Value]), 'Date'[Month] = 8, 'Date'[Year] = 2024),
...
"Jun 2025", CALCULATE(SUM('YourDataTable'[Value]), 'Date'[Month] = 6, 'Date'[Year] = 2025)
)
This will create a column for each month-year period, allowing the Table visual to show fixed columns per month, making it accessible for screen readers.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
- Anonymous1 year agoNot applicable
Thanks v-venuppu ,
Would there be a way to make this a bit more dynamic? I've got a MM/YY ID column that gives each Month Year and ID with the highest being the most recent. Could I add in the MAX calculation here to look for the most recent month, then do MAX - 1 to get the previous one? Then I could create 24 of these to show the past 2 months, which would interact with a MM/YY filter on the page to allow users to move between months.
Is that possible?
Otherwise I'll need to keep creating new columns each month when we get new data.