cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
DebbieE Member
Member

Sort by a value NOT in the visualisation

 I have a simple bar chart with 3 values in it. Likes Retweets and URL Clicks. I want to sort by the total of all 3. Not by a single value. I dont want the total in the bar chart.

 

I tried creating a new column Likes+Retweets+URL_Clicks but I cant figure out how to sort by it. I tried clicking likes and then going to Modelling Sort By column and changing it to this new column but i gete the message

 

We cant sort the Likes column by [NewColumn] There cant be more than one value in [NewColumn] for the same value in Likes.

Is there any way of doing this?

 

Thanks in advance

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Sort by a value NOT in the visualisation

@DebbieE Please add a new column as "Total" in the table

 

Total = Test22ChartSort[Likes] + Test22ChartSort[ReTweets] + Test22ChartSort[URLClicks]

Then select "Tweet" field and change "Sort By Column" to Total, as below

 

image.png

 

Now here is the expected output sorted by total which is not present on the chart.

 

image.png



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





4 REPLIES 4
Super User
Super User

Re: Sort by a value NOT in the visualisation

@DebbieE Any sample data and expected output will be really helpful to solve your issue quicker.



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





DebbieE Member
Member

Re: Sort by a value NOT in the visualisation

So I have

 

Tweet Likes Retweets URL Clicks

A        14     6              10

B        1       5               4

C        20     6              1

D       25      16            1

 

This is i a bar chart. Axis Tweet Text  Likes Retweets and URL Clicks as values.

I want to sort so the tweet with the most Likes Retweets and URL clicks put together is at the top. 

I dont want to sort by any of these measures seperately, I want to sort by the total

I dont want this total in as a value in the chart

I cant sort by a value that isnt in the chart or if I can I dont know how to.

Super User
Super User

Re: Sort by a value NOT in the visualisation

@DebbieE Please add a new column as "Total" in the table

 

Total = Test22ChartSort[Likes] + Test22ChartSort[ReTweets] + Test22ChartSort[URLClicks]

Then select "Tweet" field and change "Sort By Column" to Total, as below

 

image.png

 

Now here is the expected output sorted by total which is not present on the chart.

 

image.png



Did I answer your question? Mark my post as a solution !

Proud to be a Datanaut !





DebbieE Member
Member

Re: Sort by a value NOT in the visualisation

Ive tried this but my only problem is. Total is in the fact table with all the other metrics. The tweet text is in a seperate table.  When you go to Sort by column you can only sort by values in that specific table. Both tables are joined and I dont want the total field in the none fact table.

 

Its a pity you cant Sort by columns in other related tables.