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

DAX Dense Rank Calculated Column based on Prior Sales Amount Values

From the follow data set, I am trying to use DAX to derive Column H, which is the ActivationNumber. When a Product is first activated, there is no prior Sales Amount, and the ActivationNumber = 1. If the Company has a gap in its purchase history for that Product, and then purchases it again later, the Product is "reactivated," so the ActivationNumber iterates and becomes 2.

 

I've also included "PriorAmount" and "ActivationDate" as possible helper columns. I'm able to derive PriorAmount using LOOKUPVALUE(), but unable to derive ActivationDate with DAX.

 

Capture.PNG

 

Any help would be greatly appreciated on the DAX calculation for Column H, "ActivationNumber." Thanks!

1 REPLY 1
v-chuncz-msft
Community Support
Community Support

@Anonymous,

 

You may refer to the following thread.

http://community.powerbi.com/t5/Desktop/How-to-create-ID-variable-by-value-an-other-variable/m-p/369...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members 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.