Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 8 | |
| 8 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 23 | |
| 13 | |
| 10 | |
| 6 | |
| 5 |