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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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