Forum Discussion

rohithkothaneth's avatar
rohithkothaneth
Icon for Resolver I rankResolver I
3 years ago

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_quarterRecords
Account 112021-Q11
Account 72021-Q21
Account 82021-Q11
Account 92021-Q11
Account 32021-Q31
Account 112021-Q11
Account 72021-Q21
Account 112021-Q11
Account 72021-Q21
Account 112021-Q11
Account 82021-Q11
Account 112021-Q11
Account 92021-Q11
  • Using Matric visual, I'm getting the results like below if I choose the year_quarter as "2021-Q1"
Accounts 2021-Q1
Account 115
Account 73
Account 82
Account 92
Account 31

 

  • Now im interested in getting the column name from "2021-Q1" to "count of records". Is ti possible here?

Thanks,
Rohith

6 Replies

  • You would need to create a measure called "Count of Records"  that filters to 2021-Q1.

    • rohithkothaneth's avatar
      rohithkothaneth
      Icon for Resolver I rankResolver 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 115
      Account 73
      Account 82
      Account 92
      Account 31

       

      Hope this clears the confusion.

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      Count of Records = Calculate(Countrows('Main Table'),[Year_Quarter]="2021-Q1")

      • rohithkothaneth's avatar
        rohithkothaneth
        Icon for Resolver I rankResolver 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?