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
venug20
Resolver I
Resolver I

based customer performance - provide rank diff b/w two months

Hi Every one,

 

I have data like below..... 

 

Aug & Sep month data customer wise sales. When select Sep month in "Slicer"

 

I want to show employee ranks month wise.....

 

Sample output like below...

 

 SepAug
CustomerRankRank
A47
B24
C38
D65
E12
F71
G83
H56

 

 

Sept month Data :

 

CustomerSep MonthValuesRank
B02-09-2018915261
A09-09-2018895222
E13-09-2018886913
E05-09-2018879614
H16-09-2018876355
F22-09-2018847766
A25-09-2018817897
H08-09-2018815258
D04-09-2018789289
E29-09-20187072010
B10-09-20186954611
C19-09-20186860512
B26-09-20186592713
C27-09-20186555614
C03-09-20186537015
G07-09-20186343816
E21-09-20186333717
A01-09-20185707318
B18-09-20185573119
C11-09-20185544720
D12-09-20184853021
F30-09-20184191822
G23-09-20183703623
F14-09-20183313624
D20-09-20183220125
H24-09-20182782326
G15-09-20182322027
D28-09-20181936028
A17-09-20181626029
F06-09-20181296830

 

 

Aug month Data:

 

CustomerAug MonthValuesRank
A01-08-20185856027
B02-08-20181717626
C03-08-20184922931
D04-08-201814833010
E05-08-20181795885
F06-08-201812584914
G07-08-201810237320
H08-08-20181616108
A09-08-201813917712
B10-08-20189421322
C11-08-201810572219
D12-08-201812029117
E13-08-201810208021
F14-08-20181570719
G15-08-20181823834
H16-08-20181887081
A17-08-20181623817
B18-08-20188310524
C19-08-20185548028
D20-08-201812041516
E21-08-20186465926
F22-08-20188348523
G23-08-201811618718
H24-08-20188214625
A25-08-20185064130
B26-08-201814064311
C27-08-201812148015
D28-08-20185338329
E29-08-20181870933
F30-08-20181880252
G31-08-201813212813

 

 

Thanks in advance....

1 ACCEPTED SOLUTION

Hi,

 

You may refer to my solution in this PBI file.

 

Hope this helps.

 

Untitled.png 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
PattemManohar
Community Champion
Community Champion

@venug20 I've tried below steps to solve your scenario...

 

Use "Group By" option in "Power Query Editor" to group customer wise values and the output will look like below

 

AugCustAugCustSeptCustSeptCust

Then, add "New Column" using following DAX expression under "Data" pane

 

AugRnk = RANKX(AugCust,AugCust[Values]) 
SepRnk = RANKX(SepCust,SepCust[Values]) 

Have a relationship between these two tables using "Customer" field and now use a "Table" visual to have a output like this..

 

Final OutputFinal Output

 





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




@PattemManohar

 

i want to select "Sep" month in Slicer. you can treat as one table for "Aug" & "Sep". 

 

but should give month selection in "Slicer". based on selection output should be display.

@venug20 I didn't really get what you want with the slicer ? That means, if you select "Sep" in slicer then you want to show Sep and Aug. If you select "Aug" then you want to show Aug and Jul  OR you need to show Aug and Sep (Just order of columns preference)...

 

Please elaborate a bit....





Did I answer your question? Mark my post as a solution!

Proud to be a PBI Community Champion




@PattemManohar

 

Yes, treat "Aug" & "Sep" as one table (Not Two tables). i want to show "Aug" & "Sep" months in "Slicer".

 

When i select "Sep", data shows for "Aug" & "Sep" months with rank customer wise.

 

When i select "Aug" data should be show for "Aug" & "July" months with rank customer wise. (This part, No need now, there is  no data)

 

 

 

 

Hi,

 

You may refer to my solution in this PBI file.

 

Hope this helps.

 

Untitled.png 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur

 

Thanks for provide solution for this query, It's working fine as my point of view. 

 

Thanks all who are respond to my query.

 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @venug20,

 

I made one sample for your reference.

 

1. Create a calculated table using the formula and create retaltionship between it and teh fact table.

 

Table = DISTINCT(Table1[Customer])

1.PNG

2. Create the measures as below.

 

Measure = SUM(Table1[Values])
rankall = RANKX(ALL('Table'),[Measure],,DESC,Dense)

Capture.PNG

For more details, please check the pbix as attached. Please notice here we cannot meet the requirement as you said: "When i select "Sep", data shows for "Aug" & "Sep" months with rank customer wise." We can select slicer multi options to work around.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

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.