Forum Discussion
Matrix visual picking the filtered column value as column name for the column
Hello,
I'm looking for a solution suggestion here. In the Matric visual, could I give a custom static column_name rather than PBI using the filtered value itself from a column as a column name
- Below is my scenario
- I have a main table that will give me account,quarter & record informations
| Accounts | Year_quarter | Records |
| Account 11 | 2021-Q1 | 1 |
| Account 7 | 2021-Q2 | 1 |
| Account 8 | 2021-Q1 | 1 |
| Account 9 | 2021-Q1 | 1 |
| Account 3 | 2021-Q3 | 1 |
| Account 11 | 2021-Q1 | 1 |
| Account 7 | 2021-Q2 | 1 |
| Account 11 | 2021-Q1 | 1 |
| Account 7 | 2021-Q2 | 1 |
| Account 11 | 2021-Q1 | 1 |
| Account 8 | 2021-Q1 | 1 |
| Account 11 | 2021-Q1 | 1 |
| Account 9 | 2021-Q1 | 1 |
- Using Matric visual, I'm getting the results like below if I choose the year_quarter as "2021-Q1"
| Accounts | 2021-Q1 |
| Account 11 | 5 |
| Account 7 | 3 |
| Account 8 | 2 |
| Account 9 | 2 |
| Account 3 | 1 |
- Now im interested in getting the column name from "2021-Q1" to "count of records". Is ti possible here?
Thanks,
Rohith
6 Replies
- lbendlin
Super User
You would need to create a measure called "Count of Records" that filters to 2021-Q1.
- rohithkothaneth
Resolver I
As mentioned in my original post, im interested in getting the column name as the min of the (Year_Quarter) column and the values to be the "count of records" for the respectiive accounts.
Using Matric visual, im interested to get the result like below
Accounts min(Year_quarter) Account 11 5 Account 7 3 Account 8 2 Account 9 2 Account 3 1 Hope this clears the confusion.
- rohithkothaneth
Resolver I
Thank you for your update. Could you please provide me with a sample DAX query?
- lbendlin
Super User
Count of Records = Calculate(Countrows('Main Table'),[Year_Quarter]="2021-Q1")
- rohithkothaneth
Resolver I
Great thanks.
If i use [Year_Quarter] as a filter and needs to be picked dynamically as max(Year_Quarter), i will need to use a FILTER function here?