Sorting the values in a listbox when using an expression in the sort tab in Qlikview - sorting

I want to know if anyone knows how to sort the values in a listbox in Qlikview, when one is forced to have an expression in the sort tab?
I had to use the same expression from the general tab in the sort tab
if(datakilde='Aarlig', Aktivitetsnavn)
Otherwise the listbox didn't show the associated values (from a selected value from another listbox) in the top of the listbox - which aren't very user friendly.
But as a consequence the sorting in alphabetic order is no longer works...
(And I had to have an expression in the general tab, becausecI only need a subset of the loaded data).
(I also tried with the option auto ascending in the state box under the sort tab).
See my sort tab below.
Kind Regards Maria

There are multiple solutions on this, but I think the correct one, would be to create a field in your datamodel, that contains just the values that need in the listbox.
Listboxes are not very good at filtering data. So take your if statement, and put it into the source table:
if(datakilde='Aarlig', Aktivitetsnavn) as Aktivitetsnavn_2
Then you don't have to struggle with filtering data in listboxes and your sorting will be correct.

i had similar problem while sorting a listbox with values filtered by an expression. I gave up on filtering in listbox and filtered in my load script. After that i was able to sort properly.

A solution for a similar situation I just had was the following:
I've loaded all Items that i needed sorted & filtered out in a separate table, for example:
zones:
LOAD * INLINE [
zone, **zone_order**
zone A, 1
zone D, 2
zone C, 3
zone B, 4
];
I've added my zone in the filter and in the Sort tab, i've chosen to sort by expression: zone_order, and that's it!

Related

SSRS Static fields in groups

Good afternoon!
I have created a report with the wizard to create a matrix that is grouped and has drill down rows. I have added filters to the rows and columns and it works great! I then copied that matrix and modified the filters, so I had two matrixes.
But what I really wanted was those two rows in the same matrix, just in different row groups. So I added another group, using the adjacent below option, and then added all the child groupings. However, when I run the report it shows the values for the first row of the drill down data.
When I look at the groupings I can see the one I did manually has a 'Static' field in each row grouping but the ones that the wizard did (with the red ?), they don't have that "extra" row:
What do I need to change or how do I need to add my groups so that I don't get that "static" row and not show the data? I have the visibility set to 'Hidden' and the toggle set up for the prior grouping set data.
Assuming a few things....
the data comes from a single dataset
You are differentiating between Property and Violent crimes by filtering on a column, I'll call it IncidentGroup for the sake of illustration..
I've understood your question ! :)
Get to the point where you had just a single tablix filtered to show 'Property crime'.
Now remove or edit that filter so it shows all the data you need in the report.
Finally, right click on your Matrix1_IncidentCategory row and add a parent group, choose IncidentGroup (or whatever the column is actually called) and check the box to add a group header.
That should be it, there is no need for a second tablix.
Without knowing how you are filtering currently it's hard to give a complete answer but this should get you close, if not all the way there.
If this doesn't work for whatever reason, please post sample data from your dataset output and your current filters.

How to filter entries that are not duplicates of entries from others columns in Google Sheets?

I have a column called "Masterlist" which contains values from Lists 1, 2 and 3. It also contains values which are present only in Masterlist.
How can I filter them, like shown at the attached image in Google Sheets?
EDIT: The lists will have more than one entries.
Solution 1
In E2, type in
=filter(A2:A,arrayformula(iserror(match(A2:A,B2:D2,0))))
Check the documentation of filter or match for how to use them. With match, be sure to include the third argument. That is an easy one to forget. arrayformula iterates a formula over a range. The output can be a range, in which case it will print over any un-written cells. When arrayformula interacts with match, it only iterates over the first argument, which is why this solution works.
EDIT: If you have a two-dimensional range to match to, you need to collapse them into a one-dimensional range using the concatenation operators such as
=filter(A2:A,arrayformula(iserror(match(A2:A,{B2:B4;C2:C4;D2:C4},0))))
You can experiment with endings without row indices and let Google Sheets select an ending index for you.
Solution 2
Use the native Filter View feature. Good for the scenarios where you don't need to separately print a list of the unique values in "masterlist".
Go to Data -> Create Filter View
Use the relevant help pages to navigate yourself. I can see a few ways to implement what you desire, including
filter by value on the same column (selecting the actual values manually);
filter by value on a "helper column" where you include a formula in the cells to check whether the content in "masterlist" belongs to the list you want to check against. You can use the match and iserror combo here;
custom formula using a similar formula as above.
If your column A, ie. the "masterlist", is something a user would add to, then Data Validation can be used to good effect in conjunction with Filter View.

SSRS sort not working

On a number of reports I have noticed that setting sort options through the tablix properties does not work. I choose the data I'd like to sort by (date) and set the option (Z to A), but the report still shows unsorted. Has anyone else seen this issue? I have read that updating the report xml to include the sort may be what needs to be done because the report builder does not preserve the changes made. Haven't gone down that road yet as I'm looking to see if there's a fix already identified.
Date Type Lead Name State distance Consultant ZIP State 1 Level Reason url
Those are the columns from the export with data filling each column. Can't give too much info because it shows phone numbers and addresses.
One option is to sort the data in your dataset. Then you can leave it and SSRS will honor that.
As the others mentioned, make sure you check the datatype so it's not trying to sort the dates as a string.
Set the sort priorities at the group level, not on the table or dataset properties.
You should never have to edit the XML to get this to work. This is a basic built-in feature that most reports use.
Do you have groups on your tablix? if yes, did you try sorting it with the Row Groups or Column Groups at bottom instead of the sorting properties of the tablix?

RDLC sorting on multiple columns

I want to sort an rdlc report by two or more columns.
This could happen if I have two names that are the same so then it should next be sorted by ID column.
When I navigate to textbox properties and click the interactive sort tab I can only select one column to sort by.
How to add more than one column?
EDIT: I just realised you can edit the matrix of the entire table to add multiple sort fields. I'm guessing you can also create a group and attach that to the column if needed.
I also did not find multiple columns fields for interactive sorting.
You can workaround this by specifying an expression where you concatenate columns values. Note that date field you have to format in a sort friendly way.
=Fields!MyString.Value & CDate(Fields!MyDate.Value).ToString("yyyyMMdd")
yes, you can add multiple sort fields in the tablix properties.
Aside from that, if you click on a row textbox, you can see the Interactive Sorting tab, where you can group and sort field values.
Hope this helps!

Qlikview chart sorting doesn't always work for users

I have several Qlikview charts that have interactive sorting enabled but the odd part is some columns can be sorted ascending or descending and others can only be sorted one way. Nothing happens if you click on the column again.
Each field has a proper sort defined, it looks like a bug - anyone else experience this?
Thanks
Dan
It happens often when on the sort tab of the properties it has selected more than one way of sorting for example you have a field that has sort as text and numeric value

Resources