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 shafiz_p ,
That's how my matrix is already set up. The issue is it's not accessible - so when a screen reader reads the matrix, it doesn't identify the main columns to read from, until in a table visual.
For example, the user should be able to move to column February 2025. Moving down that column the screen reader would use the Client Reach Measures column as the Reading Row and would read this column followed by the vaue in February 2025, then move down to the next. This way the blind user is able to get an idea of the performance for February across all metrics. But the matrix doesn't do this.
So I want to have a table with a column for each month in order to do this. I was thinking of trying calculation groups to do this, creating one metric for each month. But I'm not sure how I could do this or how to set it up.
Does that help?
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,
- Anonymous1 year agoNot applicable
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?