Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
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
Partner - Master III
Partner - Master III

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

View solution in original post

7 Replies
Not applicable
Author

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
Author

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

lironbaram
Partner - Master III
Partner - Master III

hei

can you post sample data

Not applicable
Author

Please see attached. Cheers

lironbaram
Partner - Master III
Partner - Master III

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
Author

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
Author

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