Reply
nleuck_101
Responsive Resident
Responsive Resident
Partially syndicated - Outbound

Issues trying to use new DAX function ROWNUMBER

Hello All,

 

Has anyone else tried to use the new DAX functions and receive the following error "an unexpected error has occurred"? I'm trying to use ROWNUMBER but nothing I do to try and fix it works. Then when I try to delete the measure, I get another error that tells me to close and restart Power BI desktop.

 

Thanks,

4 REPLIES 4
v-yiruan-msft
Community Support
Community Support

Syndicated - Outbound

Hi @nleuck_101 ,

Could you please provide the whole formula of measure which include ROWNUMBER function and some sample data involved in the measure? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicated - Outbound

Hello @v-yiruan-msft 

 

Here is some sample data that I'm working with. I want to have a row number count that is ordered by Attendance % in highest-lowest and then Length of Service (Days) highest-lowest.

 

BadgeLength of Service (Days)Attendance %
100256100.00%

101

624100.00%
102400100.00%
103463100.00%
10438999.60%
10528199.56%
10632299.00%
10740098.92%
10850498.92%

 

Syndicated - Outbound

Hi @nleuck_101 ,

You can achieve it in Power Query Editor, please check the following codes and screenshot. You can find the details in the attachment.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("Zc5RCsAgCAbguwh7izBNl2cZ3f8a06LG6EXkA//f54GCCAlI1KfvGfGCnsKLi1I9nFzquPo7hysfHgnczKdZ1s0Sta1MFl0cfzDR5C/k3qXWstHi5iCjYXF/AQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Badge = _t, #"Length of Service (Days)" = _t, #"Attendance %" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Badge", Int64.Type}, {"Length of Service (Days)", Int64.Type}, {"Attendance %", Percentage.Type}}),
    #"Sorted Rows" = Table.Sort(#"Changed Type",{{"Attendance %", Order.Descending}, {"Length of Service (Days)", Order.Descending}}),
    #"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 1, 1, Int64.Type)
in
    #"Added Index"

vyiruanmsft_0-1681890374032.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Syndicated - Outbound

@v-yiruan-msft 

 

But this isn't going to be dynamic. I was hoping to use the new DAX functions that Microsoft rolled out in the April 2023 update.

avatar user

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)