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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
MClipsham92
Frequent Visitor

Classifying a conditional Column as the Index

Hello All,

 

I'm having a small issue, I've got some survey data that I am trying to put into a Line Graph, however when I do it the points on the x axis (Start of programme, week 12, week 24, end of programme etc) are all in the wrong order. I figured I could create an index column for this, so I've created a conditional column in the query editior that is a series of IF statements that gives the rows a number 1 to 12  (IF Attribute equals Start of Programme then 1 etc).

 

The issue I have is I can't seem to find the button classify this solumn as the index, any help?

 

Thanks, 

1 ACCEPTED SOLUTION

I've had a play about with your data and i was able to get it to work.

I created the Line Chart. It looked like your version.

I changed the 'sort by' to Index. Looked the same.

It won't change the order if the visual already exists unless you remove the attribute or score from the field well.  If you remove it and add it back in, it should follow the 'sort by' order

View solution in original post

5 REPLIES 5
HotChilli
Super User
Super User

Are you looking for the 'sort by' function on the Modelling tab of power bi desktop?

Hi HotChilli,

 

That doesn't seem to work I'm afraid. 

 

This is what the Line Graph is doing:

 

xzdgf.PNG

 

As you can see for some reason Instructor Score 2 is coming up before Instructor score 1 whereas they should be the other way round.  

 

The data looks like this:

 

Student    Attribute                Score   Index

 

xxxx          Instructor score 1     7        1 

xxxx          Instructor score 2     12      2

 

The 'sort by column' drop down already has the Index column ticked.

 

Thanks,

I've had a play about with your data and i was able to get it to work.

I created the Line Chart. It looked like your version.

I changed the 'sort by' to Index. Looked the same.

It won't change the order if the visual already exists unless you remove the attribute or score from the field well.  If you remove it and add it back in, it should follow the 'sort by' order

Hi,

 

I also have some trouble with matching the Index Column. 

Can you help me?

 

Thanks in advance

 

Excellent thanks, that seems to have sorted it, the issue must have been that I needed to delete and remake the Visual.

 

Thanks,

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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