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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ldwf
Helper III
Helper III

Rownumber sometimes skips a number

I have a simple table visual that users drill thru to, and added a row number column to label each row in the table.  I created an index column and am using this in my DAX fomula.  

Row Number=

CALCULATE(

    COUNTROWS('Table'),

    FILTER(ALLSELECTED('Table'), 'Table'[Index] <= MAX('Table'[Index]))

)

The results in the table shows the correct number of rows, but the row number column is sometimes being incremented by a number more than 1:
RowNumber.PNG

I use this DAX formu; a lot with no issues, but for some reson it skips.  Any thoughts?

3 REPLIES 3
ryan_mayu
Super User
Super User

@ldwf 

maybe you can try 

Row Number=

CALCULATE(

    COUNTROWS('Table'),

    FILTER(ALLSELECTED('Table'), 'Table'[Index] <= MAX('Table'[Index]))

)+0

 

 

or show items with no data

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-show-items-no-data?wt.mc_id=DP-MVP...





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Unfortunately, that did not help.  It made the value zero for every record in the table

could you pls provide some sample data?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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