Discussion board where members can get started with Qlik Sense.
I am creating a filter have 3 filed (revenue, profit, profit_margin)
I want to have it as this order to show on the dashboard, any suggestion how could I sort?
Now is look like this
or do you have any suggestion using some easier way to just reorder the fields ?
You could try sorting by frequency if your data has more records for revenue, and next for profit and then for Profit-margin.
But if that's not the case - you should try the expression. (you could add an extra column to your data called Filter_flag and populate it as 1 for Rev, 2 for margin and 3 for profit.
Then use and expression to sort it using this field.
Let me know if that helps.
you can sort by expression
mixmatch(yourfield, 'Revenue', 'Profit', 'Profit_margin')
1) load in a temporay table the values in the order you want at the beginning of the script
2) load other tables
3) drop the temporary table
the field is sorted (load order) as you define in step 1
// step 1
load * inline [
// step 2
Profit , 2
pick(ceil(rand()*3), 'Revenue', 'Profit', 'Profit_margin') as field,
rand()*100 as val
// step 3
DROP Table tmpSortField;
Use the expression
Pick (match (
Sort by expression
Valuelist(revenue, profit, profit_margin)
create dual() values for your field values in your script...
Thank you so much for all the input. All of them are working. --want to mark all as correct answers.
Thanks again for all the input!
I did it in another way. only works in this case because the number of Income>Profit>Profit margin
so I use expression just using sum(Total) as ranking