Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello ,
I'm looking solve my problem .
I have a table with column A with datetime
Column A
2024-01-11 10:54:55
2024-01-11 10:54:33
2024-01-11 10:51:00
2024-01-11 10:51:00
2024-01-11 10:50:23
Column B
123
175
155
122
125
i would like recive table ( Column A and B) with first 4 row based on Datetime (Ascending)
which function I should use ?
I thought about RANKX , but that function rankx needs measure
thanks
Solved! Go to Solution.
Hi @adii ,
Are you referring to finding the ordering of [column A] based on the grouping of [column C]?
You can use the following calculated columns:
Rank =
RANKX(
FILTER(
ALL('Table'),'Table'[ColumnC]=EARLIER('Table'[ColumnC])),'Table'[ColumnA],,DESC,Dense)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @adii ,
Are you referring to finding the ordering of [column A] based on the grouping of [column C]?
You can use the following calculated columns:
Rank =
RANKX(
FILTER(
ALL('Table'),'Table'[ColumnC]=EARLIER('Table'[ColumnC])),'Table'[ColumnA],,DESC,Dense)
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @adii ,
Here are the steps you can follow:
1. Create calculated column.
Rank =
RANKX(
'Table','Table'[ColumnA],,DESC,Dense)
2. Create calculated table.
Table 2 =
FILTER(
'Table',
[Rank]<=3)
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Perfect it's working thanks .
so can you help me in a little more tricky example . Now I need do the same like above but I got extra column C with date (year-month-day) and a would like make ranking for each day separately.
? I'n trying use
calculate( Rank, All(table[column C]) but doesn't work ..
What you think about add column with numer increment ? Start from 1 to 4
I'd use TOPN fucntion:
Doesn't work , it's multiply values, should be scalar
use the WINDOW function with relative addressing from -3 to -1
Doesn't work
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
26 | |
10 | |
10 | |
9 | |
6 |