Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Best Practice on Data Structure lots of Types

Hi,

I was been told by one of my Qlikview seniors in the following scenario.  Would like to ask on the guidance on how to approach this.

Example:

In a Qlikview table structure, there are quite a few departments with numeric types assigned.

Example, Sales -0, Engineer -1 , Education -2, Marketing -3, R&D -4,etc.

At dashboard level, it will be not be effective to use the following expression:

=If (Department = 'Sales', ....)

OR

=If (Department = 0, ....)


What he suggested is to break up this different departments into different table structures as this will reduce the IF expression in the dashboard level as we are manipulating the data at script level.


Can anyone guide me on this approach?


Thanks

Chun Wey



5 Replies
maleksafa
Valued Contributor

Re: Best Practice on Data Structure lots of Types

it depends on your data model, size and the number of distinct values which matters the most, so you need to see which one of the 2 approaches will give you the smallest size.

as for the if condition and nested if, you can solve it using the pick function. pick(n, expr1[ , expr2,...exprN])

Re: Best Practice on Data Structure lots of Types

Hi,

Check this

Regards

ASHFAQ

Not applicable

Re: Best Practice on Data Structure lots of Types

Hi Malek,

Thanks for your prompt response.

Let say I have decided to break into smaller data structure as this will be good in my performance. How do i do that?

If I break them up, wont there be a lot of small tables (new key)linking to main table resulting in snowflake schema ?

thanks

Chun Wey

Not applicable

Re: Best Practice on Data Structure lots of Types

thanks for ur helpful docs, have already read thru.

maleksafa
Valued Contributor

Re: Best Practice on Data Structure lots of Types

definitely you will end up with snowflake schema which is not really recommended, you can break them by columns instead of different tables, but first why you need to distinguish between the departments? do you have different calculation in your expression based on the department? because at then end if you break them by small tables, columns etc... you will still need to treat them differently in your expression.

again if that is your case you check look for the pick function to solve the nested if conditions.

Community Browser