Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
We recall in Qlikview, it was possible to find the first/last item in alphabetic order from a field/dimension using MinString or MaxString function. Qliksense has a similar functionality, but it behaves differently that if any values are selected, then it only looks the currently selected values.
For instance, assuming the field Month has values 1-12, MinString(Month) will return 1 if nothing is selected, but if I select the months 3, 4 and 5, it will return 3 instead of 1. The below screenshots demonstrate this undesirable behavior from Qliksense.
Screenshot 1: Month field when unselected(the min value is 1)
Screenshot 2: Month field with (3, 4, 5) selected(the min value becomes 3!)
However, I would need it to still fetch the first/last item from all available/possible values, rather than from a list of currently selected values. How to achieve this with MinString or MaxString? Or is it not possible at all? Please help.
If your values are numeric values then you can use min() or max() functions
Try Min({1}MonthNum) and Min({1}MonthNum) to ignore any selection made to the data model.
If your values are numeric values then you can use min() or max() functions
Try Min({1}MonthNum) and Min({1}MonthNum) to ignore any selection made to the data model.
Thx, the solution works. Btw we actually need to deal with both numeric and text fields, just in this example it happens to be numbers.
With this being said, do you know what values Qliksense selects by default for single-select fields(those one and only one selection fields)? I thought it would select the item with lowest numeric/alphabetic order, but it seems to select whichever item currently selected when I last save the Qliksense app. I do not understand this behavior, as the item list is different across different environments(dev, stg and prod). Is there a way to make Qliksense choose a default value for single-selection fields in a better way? Thanks.