cancel
Showing results for 
Search instead for 
Did you mean: 
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
Microsoft

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.

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors