you have to add seperate field values to a new field (e.g. "Livello2/3") containing the Livello2 values and the Livell2/3 combinations to be able to select the Livello2 groups.
hope this helps
Thank you for your fast reply.
I've tried your suggestion but, maybe my fault, I am not able to reach the desired result.
Is possible that I am doing wrong the expression...could you please have a look to the attachment?
On the first row I put a similar situation as it is right now: "Main-Category-SubCategory" - "CatandSubcat" should be the new double filter which I am not able to select nothing about "livel1".
Then I've tried 3 instances with the LevelA (livel1+livel2) as you suggested, but still not able to select livel1 in the listbox.
What am I doing wrong?
ListboxExp.rar 134.5 K
one solution could be:
table1: LOAD *, AutoNumberHash128(Main,Category,Subcategory) as %SelectID, Main&'/'&Category&'/'& Subcategory as TempPath INLINE [ Main, Category, Subcategory Food, Pasta, Barilla Food, Pasta, Buitoni Food, Rice, Basmati Food, Rice, Classic Food, Meat, Filet Food, Meat, Rib Food, Fish, salmon Food, Fish, SwordFish Drinks, Wine, Red Drinks, Wine, White Drinks, Beer, Strong Drinks, Beer, Lite ]; tabSelectionPath: LOAD Distinct %SelectID, Left(TempPath,Index(TempPath&'/','/',IterNo())-1) as SelectionPath Resident table1 While IterNo()<=SubStringCount(TempPath,'/')+1;
hope this helps
QlikCommunity_Thread_167108.qvw 156.8 K
Thank you Marco! Amazing!
I feel satisfied about the solution, and I've already implemented in my project.
However, I need to ask you another thing, in this case not so critical, but if we can find a way, should be great and the final product could be considered 100% top functional.
The problem is this: not all the Level are fully completed; some are with Level 2 full and other have less option, or the Level 3 not existing.
To use our previous example, as we have another "Category" stuff, such as Biscuit or - I don't know - Candies, but no level 3 at all, for instance, or just one of possible alternative; or to be more clear, as I have to put a new "Category" of wine - like "spanish wine", but in Subcategory, only in this case, just red Spanish Wine.
What is happens to me right now, is that where there are no choice available, remain a white blank space, as there might be a checkbox but is not visible at all.
This make the final presentation of the filter, not fitting good, due to the fact that Level 2 and 3 in my project are in certain case, dense of fields.
The question is: is possible to avoid blank spaces and let the filter appears exactly as the SelectionPath you design?
In anycase, thank you again for helping me!
Have a nice day!
I need a last help for this situation.
In the attach you'll find your last listbox modified with 2 more data.
If you pay attention, you will notice a couple of data with no info on the "3rd Level" (SubCategory), and this means they generate a blank subspace.
The request is: is possible to remove the blank spaces under "Water" and "Pastina"?
Thank you in advance for any ideas or resolution!
You can try it in couple of ways:
Using the expression:
=If(Len(Trim(SubField(SelectionPath, '/', -1))) > 0, SelectionPath)
or in the script:
AutoNumberHash128(Main,Category,Subcategory) as %SelectID,
Main&'/'&Category & If(Len(Trim(Subcategory)) > 0, '/' & Subcategory) as TempPath
Main, Category, Subcategory
Food, Pasta, Barilla
Food, Pasta, Buitoni
Food, Rice, Basmati
Food, Rice, Classic
Food, Meat, Filet
Food, Meat, Rib
Food, Fish, salmon
Food, Fish, SwordFish
Drinks, Wine, Red
Drinks, Wine, White
Drinks, Beer, Strong
Drinks, Beer, Lite
Left(TempPath,Index(TempPath&'/','/',IterNo())-1) as SelectionPath
The only problem is, it gives you a weird looking output where Water and Pastina are somewhat indented from there original spot.
I think it's ok in this way.
I am going to implement in the original project; the treeview will be more huge and with a lots of leafs, so now it depends from the global view, how it looks and if the customers don't complain about that, but for me it's enough from the moment it's correctly working, and without any blank spaces.
I am glad we were able to help. When I say 'we', I mean marcowedel and me because I just used his output to make a small tweak to get you what you wanted. So most of the credit goes to him (I can take a small credit )
Have a good one.