Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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))Data (Column H,I are derived using the criteria in Col L-P))Result in Table formatResult 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 3
v-lionel-msft
Community Support
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
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
Greg_Deckler
Super User
Super User

Well, you would have to create a measure for each of the columns in your desired output. Other than that, tough to say. Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.