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
prashant_ora
Helper II
Helper II

Serial Number using database table

Hi,

 

I am having one table containg 1000 records. Now when i displaying the data in table visual i need a serial number column. I wrote a dax query  but if i select all the data it gives proper serial no,but  when i display some data then it gives some random number may the row/record number. Please suugest any dax query which solve the problem.

 

Thanks

Prashant

5 REPLIES 5
Phil_Seamark
Microsoft Employee
Microsoft Employee

Can you please post a sample of what your data looks like (including your DAX measure)


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Pl find the below screen. When i selecting all the projctid it gives the sr no start from 2 and then so on, but when i select the random id from slicer , it also shows the random sr no.

 

 

sr no.png

 

 

 

Hi @prashant_ora,

 

Did you use the RANK function to create the serial number? If so, try to encase the first parameter in ALLSELECTED. Can you share the formula?

 

Best Regards,

Dale

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

Yes the same thing i used and its working fine when i select column from one dim. When in table visual if i select columns from other dimension also then it does not work. It hangs and finally stopped.

Anonymous
Not applicable

Hi @prashant_ora

 

Give a try to this :

 

1. Add index column in Query Editor

2. Create a Measure in DAX ith this formula:

DAXrowcount1 = CALCULATE(COUNT(Table1[Index]),FILTER(ALLSELECTED(Table1),Table1[Index]<= MAX(Table1[Index])))

 

Let me know if you see any issues with this.

 

Thanks
Raj

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.