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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

power Bi direct query giving incorrect row number some times

Hi,

 

my source is sql server using directy query in  PBI.I have created row number measure, i will use this row number for running total calculation.very few times this row number is calculating incorrect(example row number starting from 17 instead of 1).

my source sql server contionously updated every minute with C sharp application.

In below screen shot seq num(row number) is correctly generated.

 

pruthive_0-1688018324225.png

In below screen shot seq num(row number) is Incorrectly generated.Please help

 

pruthive_1-1688018538542.png

 

measure formula:

 

DistanceIntM =
VAR MaxValue = MAXX(ALL('BlockSubBlock'),'BlockSubBlock'[ID])
VAR SlicerValue = SELECTEDVALUE('BlockSubBlock'[ID],30)

RETURN
    IF(min('vwMWSystemWideEEP'[ID]) >= SlicerValue,
       min('vwMWSystemWideEEP'[ID]) - SlicerValue,
       min('vwMWSystemWideEEP'[ID])  +(MaxValue- SlicerValue)
    )
 
;
 below is row number measure
UniquekeyIntM = ROWNUMBER(ALL(vwMWSystemWideEEP),ORDERBY([DistanceIntM],ASC,vwMWSystemWideEEP[RowNo],ASC))

 

0 REPLIES 0

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors