Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Not applicable

Dimension Expression: If Clause

Hi Guys,

I have a database that has a list of names and the hours that these people worked. I am busy creating an invoicing checking report and need some help figuring out how to do this one thing in particular.

I want my dimension, which is "Name" to list only names and sum hours for where I have an if clause. The if clause would work like this. If the person has a particular cost code appearing more than once for a particular week, list his name and his hours for where there is a 'duplicate' essentially. How would I do this?

Thanks, Byron

1 Solution

Accepted Solutions
lironbaram
Honored Contributor II

Re: Dimension Expression: If Clause

hei

attach is an example

first icorrected your table

in the expression i add the filed TempName to the aggr fields

second i created new table which diplay only the records where the same Temp Name

in the same wkend 

in the same ctdesc

has more then one record

hope its helps you

7 Replies
Not applicable

Dimension Expression: If Clause

In my straight table I have this as an expression. I somehow need to add if week ending = weekending (duplicate) to this expression

aggr(sum({$<CategoryDesc={'Labour Charges'}>}Hours),TempName)

Cheers, Byron

Not applicable

Dimension Expression: If Clause

Anyone??? Please help, or ask me to explain again if need be. Thanks, Byron

lironbaram
Honored Contributor II

Dimension Expression: If Clause

hei

can you post sample data

Not applicable

Re: Dimension Expression: If Clause

Please see attached. Cheers

lironbaram
Honored Contributor II

Re: Dimension Expression: If Clause

hei

attach is an example

first icorrected your table

in the expression i add the filed TempName to the aggr fields

second i created new table which diplay only the records where the same Temp Name

in the same wkend 

in the same ctdesc

has more then one record

hope its helps you

Not applicable

Re: Dimension Expression: If Clause

Thanks Iiron, we are really close From the sample data I gave you it works PERFECTLY. I'm not sure why in my 'real world' data it is not doing exactly the same. Basically what is happening is that it indicates in the aggr column if the condition is true with a 1 (which is great). For all other fields it is showing a '-' which I know to be Null???? What would I need to change to get it to not show results for items that dont fit the condition i.e. the '-'?

Thanks, Byron

Not applicable

Re: Dimension Expression: If Clause

LOL, just figured it out 'supress when value is null' Thanks for the help Iiron. Works like a charm

Community Browser