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
kkalyanrr
Helper V
Helper V

DAX query to create INDEX column when there are no Unique values in the field

Hello Team,

 

Can you help me with DAX query to add a calculated Index field to a data set.

Unfortunately the data dump isn't having any unique value fields to write (Earlier) function.

 

 

Capture1.PNGCapture2.PNG

 

Thanks,

Kalyan..

1 ACCEPTED SOLUTION

here is an article which will answer you question and help you resolve your problem:

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

8 REPLIES 8
dilumd
Solution Supplier
Solution Supplier

Hi @kkalyanrr

 

Can't you add index column in the query editor?

Capture.JPG

@dilumd

Sorry forgot to mention that it is a summarized table grouped by few columns ,.

I've already created a index column in the main dataset and copied it to the summarized table ,it is giving duplicate entries.

can you share what you are grouping this data on? RankX function can do the job. What actually you are trying to do?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

@parry2k and @dilumd

 

I tried to attach sample desktop file(but couldn't do it, hence attaching screenshots) , where in you can find I'm trying to potrait Day/Week/Month information in one chart..

when I try to use slicer the X Axis needs to be in proper sorting order(Now its working fine only for Month).

 

Now the X Axis is coming from a Union table where the X axis field values are in Text form which needs to be sorted based on Index column.

 

Thanks,

Kalyan..

 Month Wise SummaryMonth Wise SummaryWeek Wise SummaryWeek Wise SummaryDay Wise SummaryDay Wise SummaryUnion TableUnion TableFinal ChartFinal Chart

if I understood correctly, you have raw data by date and then you are creating two other tables, group by week and month. If that is the case you don't need it, you just need calendar dimension in your model and link your raw table on date with calendar dimension and then you can use hierarchary to drill down to year/month/week/date level Will that do the job?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

My requirement is huge, hence I took a piece out of it..

 

I've a dataset with the date and order prices , and wanted to potrait a chart simillar to below one, hence I 've duplicated the dataset in to 3 copies and added a custom column naming "Axis" --- Day/Month/Week..

 

The X Axis consists of the all the months,weeks and dates respectively. To sort this field I need a customized Index column.

 

Capture4.PNG

 

 

I think I got it what you are trying to do here, you want X axis to be dynamic based on the value selected in the slicer, correct?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

here is an article which will answer you question and help you resolve your problem:

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

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.