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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
audune
Frequent Visitor

Using RankX with several columns

I have three columns that I want to use as input for a ranking (analysis of beacon data).

This is what I have (heading in black), and what I want to create (heading in red😞

Timestamp rank (because of duplicates)Timestamp difference (next timestamp)AreaRank I want to create
11 minArea 11
11 minArea 11
24 hoursArea 11
320 minArea 12
420 minArea 3

3

 

The rule is; the rank should change if the timestamp difference is > 3 hours OR if the area changes.

 

Can anyone help me with this?

 

Thanks

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

One point to clarify, according to your rules, shouldn't Timestamp rank 2 create a new rank in your calculation since the timestamp difference is 4 hours?



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi smoupre - Thanks for your question.

 

The "timestamp difference" I created is the difference between the timestamp-value for the next rank (column A) and the timestamp value for the current row. Based on this, the next rank in the calculation should be given to rank+1 if the difference is over 3 hours.

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.