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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

serial number dynamic generation with alphabetical order column of text type.

MicrosoftTeams-image (11).png

 This is sorted in table visual and a slicer is present to distinguish tropical and non tropical fruits.

Now we require a serial number as per alphabetical order.

 

 

 

MicrosoftTeams-image (12).png

 

 

Requiremnt as above.

Please kindly suggest any DAX

 

 

 

1 ACCEPTED SOLUTION

Hi @nagasaikumarb22 

You can make the name column sort by ascending first, then add an index column to the table in power query.

vxinruzhumsft_0-1684124505671.png

Then create the measure 

 

s.no = RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Index])),,ASC,Skip)

 

Output

vxinruzhumsft_1-1684124558525.png

 

vxinruzhumsft_2-1684124568885.png

 

vxinruzhumsft_3-1684124577102.png

 

 

Best Regards!

Yolo Zhu

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

View solution in original post

6 REPLIES 6

Thank you for the time,now the complextity had been reduced but not yet done because i have repetetive fruit names in same year due to months variation which should not be taken into consideration.price column should be grouped sum not individual.

 

nagasaikumarb22_0-1684121445067.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

nagasaikumarb22_1-1684121672965.png

 

Hi @nagasaikumarb22 

You can make the name column sort by ascending first, then add an index column to the table in power query.

vxinruzhumsft_0-1684124505671.png

Then create the measure 

 

s.no = RANKX(ALLSELECTED('Table'),CALCULATE(SUM('Table'[Index])),,ASC,Skip)

 

Output

vxinruzhumsft_1-1684124558525.png

 

vxinruzhumsft_2-1684124568885.png

 

vxinruzhumsft_3-1684124577102.png

 

 

Best Regards!

Yolo Zhu

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

Hi thanks for your time,

But it didnt fulfill my requirement yet due to following conditions i mentioned in post,

1.Slicer selection is deviating my serial number.(Lets say year slicer  is also included. )

2.Data is not sorted in ascending prior.

Hi @nagasaikumarb22 

I don't quite understand what you mean, is the data you are referring to letters. The data I provided is not sorted in ascending order by value.

What I've provided is an incremental dynamic sort in alphabetical order, and it is only affected by the alphabetical column

can you provide some examples of the results you expect?

Best Regards!

Yolo Zhu

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

v-xinruzhu-msft
Community Support
Community Support

Hi @nagasaikumarb22 

You can create a measure.

e.g 

s.no = COUNTROWS(FILTER(ALLSELECTED('Table'),[Fruit name in Asc order]<=SELECTEDVALUE('Table'[Fruit name in Asc order])))

vxinruzhumsft_0-1684118182745.png

Best Regards!

Yolo Zhu

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

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.