Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

pivot using dax

Hello,

 

I need help with Rank and Pivot data using filters. I've attached the sample data and the result.Data (Column H,I are derived using the criteria in Col L-P))Result in Table format

 

Columns - A to E has actual data; H and I are derived columns based on the criteria

 

I was able to achieve the results using

1. Switch case in Dax to derive "Status" column

2. Using Calculated table to group and get the select order based on Min value

3. Display the data using Matrix

 

Issue here is with matrix, i am unable to add custom tool tip to rows and not sort based on the column data. If i can present the same via a table. I will be able to use custom tool tips and also sort the columns

 

I tried to use another calculated table with summarize to transform the data but it is taking a while with 500k+ rows

 

Thank you in advance for your help

3 Replies

  • v-lionel-msft's avatar
    v-lionel-msft
    Community Support

    Hi Anonymous ,

     

    Can you make a copy of your sample data in tabular form? Your example data is too much to build.

     

    Best regards,
    Lionel Chen

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Greg, Thank you for sharing the article

       

      v-lionel-msft - Below is sample data. "status" and "select per order" fields are derived based on the criteria shared above

       

      CountyClient IDDateGroupHrs  StatusSelect per order
      AB13/22/2019At Store2  Visit 
      AB13/22/2019Online6  O FTO FT
      AB103/22/2019Online8  O FTO FT
      AB113/22/2019At Store8  FTFT
      AB133/22/2019Online4  O PT 
      AB133/22/2019At Store5  FTFT
      AB143/22/2019At Store12  OtherOther
      CD23/22/2019Online4  O PTO PT
      CD33/22/2019At Store4  VisitVisit
      CD43/22/2019At Store6  FT 
      CD43/22/2019Online6  O FTOFT
      IJ53/22/2019At Store11  FTFT
      KL13/22/2019Online8  O FTO FT
      AB13/23/2019Online6  O FTO FT
      AB103/23/2019At Store3  VisitVisit
      AB113/23/2019At Store4  FTFT
      AB113/23/2019Online5  O PT 
      AB133/23/2019Online6  O FTO FT
      AB143/23/2019Online7  O FTO FT
      AB143/23/2019At Store3  visit 
      AB163/23/2019At Store9  FTFT
      CD23/23/2019Online2  O PTO PT
      IJ303/23/2019At Store8  FTFT
      IJ313/23/2019Online6  O FTO FT
      IJ313/23/2019At Store4  FT 
      IJ323/23/2019Online5  O PTO PT
      IJ333/23/2019At Store11  FTFT