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

Order Rank on Sales Data

Hi,

 

I'm struggling to add a new column to my dataset using a dax calculated column. I want it to look something similar to this:

 

findingsolution_0-1653872692657.png

 

Columns A-D are in my dataset, and I want it to have a running count so that every time a distinct email plays for an order, their count will go up by 1. This way, I'll be able to see how many times a product is the first bought item (ie to find out if Apples is the most purchased first item, then bananas etc).

 

Any help would be super appreciated!

 

2 ACCEPTED SOLUTIONS
ribisht17
Super User
Super User

@findingsolution 

 

Rank= RANKX(FILTER(all('Rank'),'Rank'[email]=EARLIER('Rank'[email])),'Rank'[date],,ASC,Dense)
 
Regards,
Ritesh

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

View solution in original post

Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Order rank = calculate(countrows(Data),filter(Data,Data[Email]=earlier(Data[Email])&&Data[payment date]=earlier(Data[payment date])))

Hope this helps.


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

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Write this calculated column formula

Order rank = calculate(countrows(Data),filter(Data,Data[Email]=earlier(Data[Email])&&Data[payment date]=earlier(Data[payment date])))

Hope this helps.


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

@findingsolution 

 

Rank= RANKX(FILTER(all('Rank'),'Rank'[email]=EARLIER('Rank'[email])),'Rank'[date],,ASC,Dense)
 
Regards,
Ritesh

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

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.