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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
sabd80
Helper III
Helper III

Add row number

Hi,

I have below data, I would like to add the column row number as a measure to flag the row number based on the date per ID.

 

I cann't add a calculated column because it is live connection to a cube.

Can you help?

 

2024-06-05_16-00-57.png

4 REPLIES 4
sabd80
Helper III
Helper III

Thanks @manvishah17 , it worked but it is very slow.

plz check its performance time by performance analysis and make sure other measures are in optimize manner.

 

Hi @manvishah17 , there are not any other measures.

manvishah17
Solution Supplier
Solution Supplier

Hi @sabd80 ,
If you need to add a row number based on a date in a live connection to a cube in Power BI, you can achieve this by creating a measure.

 

 

DateRankByID = 
VAR CurrentID = MAX(Sheet1[ID])
VAR CurrentDate = MAX(Sheet1[DATE])
RETURN
    RANKX(
        FILTER(
            ALL(Sheet1),
            Sheet1[ID] = CurrentID
        ),
        CALCULATE(MIN(Sheet1[DATE])),
        ,
        ASC,
        DENSE
    ) 

Screenshot 2024-06-05 115621.pngIf there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.