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

How can we fix the sorting of the visualization?

Sorting works fine when I select a particular month as a filter  but does not work when no filter is selected. How can we fix the sorting issue in visualization?

With Filter selected:

With No filter Selected:

11 Replies
sunny_talwar

Would you be able to share some information on how are you sorting this? Is it using an expression? Can you share your expression?

Not applicable
Author

Sorting includes three dimensions FY Month(Auto Sorting), Timing(Expression=Month_end_metric_date_key) and cases(Auto)

and Timing data contains following expression

if(report_metric_key = 3,

if(((num#(mid(month_end_metric_date_key,5,2)) - num#(mid(month_end_date_key,5,2))) * 30) + ((num#(mid(month_end_metric_date_key,1,4)) - num#(mid(month_end_date_key,1,4))) * 360) = 450,
'> 450 Days',
    ((num#(mid(month_end_metric_date_key,5,2)) - num#(mid(month_end_date_key,5,2))) * 30) + ((num#(mid(month_end_metric_date_key,1,4)) - num#(mid(month_end_date_key,1,4))) * 360) & ' Days'
)
)

shraddha_g
Partner - Master III
Partner - Master III

Can you share sample app?

Not applicable
Author

Sorry, working on server ...no sample data

Anonymous
Not applicable
Author

Hi Bhawana Adhikar

Try this:

in sorting Tab

deselect the auto selection and mark sort by expression

in expression ='num(ExampleDate)'

Regards,

Dixit panchal.

sunny_talwar

Try this as your calculated dimension:

If(report_metric_key = 3,

If(((Num#(Mid(month_end_metric_date_key,5,2)) - Num#(Mid(month_end_date_key,5,2))) * 30) + ((Num#(Mid(month_end_metric_date_key,1,4)) - Num#(Mid(month_end_date_key,1,4))) * 360) = 450,
Dual('> 450 Days', 450),
    Dual(((num#(mid(month_end_metric_date_key,5,2)) - num#(mid(month_end_date_key,5,2))) * 30) + ((num#(mid(month_end_metric_date_key,1,4)) - num#(mid(month_end_date_key,1,4))) * 360) & ' Days',

((num#(mid(month_end_metric_date_key,5,2)) - num#(mid(month_end_date_key,5,2))) * 30) + ((num#(mid(month_end_metric_date_key,1,4)) - num#(mid(month_end_date_key,1,4))) * 360))
)
)

Not applicable
Author

Thank You Sunny . It works absolutely fine. Really Appreciated. and If you could help me with the hardcode visualization Question that I have uploaded?

Not applicable
Author

Hi Sunny , this code only works when no filter selection is made for year and Month ...I have two linked Visualization which returns no value if I use this code.

sunny_talwar

Was this working before you made the changes I proposed?