Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day everybody,
I have a table with:
+ Type: POT, WD...
+ No: numeric value
I want to sort by with these conditions:
The first priority is "Type", the second is "No" and it should be in Ascending.
It worked well with Type = {POT, WD, FLT} but with Type = "*" then the "No" field was not in order (ascending or descending)
Could you please suggest the idea. Thanks in advance.
I attached the qvw file & screenshot here.
May be create a new field in the script like this
Sorting:
LOAD *,
WildMatch(Type ,'POT','FLT','WD','????????','R-*') * 1000000 + No as Sort;
load * Inline [
Type, No
Aug 2017, 42948
Jun 2016, 42948
Dec 2016, 42948
May 2017, 42948
And then sort for Max(Sort)
May be create a new field in the script like this
Sorting:
LOAD *,
WildMatch(Type ,'POT','FLT','WD','????????','R-*') * 1000000 + No as Sort;
load * Inline [
Type, No
Aug 2017, 42948
Jun 2016, 42948
Dec 2016, 42948
May 2017, 42948
And then sort for Max(Sort)
Looks like, This is not make sense to me. Because, You don't have common value for first dimension. Why you need this?
Thank Sunny, it was a good solution, it is not correct 100% but I could work around with your idea.
Hello Anil, thanks for your feedback.
I need to sort by "Type" field firstly then by "No" field. After considering Sunny's solution I have this screenshot and it reach my expectation 90%.