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.
I don't think you will get your desired output using table visual, for this you need to use matrix visual either use switch value to rows or not.
In table , all fields are treated as columns. So using calculation group in table for each month as an item, it will not show as individual column as you want rather it will show month name as row item.
To set up a calculation group, go to model view, select calculation group, name it. Then create seperate Item for each month. For example, for January2025:
January2025 =
CALCULATE(
SELECTEDMEASURE(),
'Calendar'[Month] = 1 && 'Calendar'[Year] = 2025
)
Repeat this process for all 12 months.
Place calculation group in column and client research measures in values. Also, client research measures column in rows.
Try and check if this helps or not.
Thanks,
Thanks shafiz_p ,
Do you know if there's an alternative way to get a column in a Table Visual to read out the values each month for a metric?
What about creating a calculated table and putting the values from calculation groups into the calculated table?