Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Add depending on dates

Hello all,

I'm trying to add values depending on whether the dates are the same or not, for example, i have a QVD with a table that contains the following dates:

NameStartFinishNumber
Name 101/01/201701/01/20176
Name 103/02/201711/12/20174
Name 102/02/201702/02/20175

When I use this expression If(date(Start,'DD/MM/YYYY') = date(Finish,'DD/MM/YYYY'), Sum(Number))  does not show the result in the pivot table, and i trying to show the following:

NameTotal Number
Name 111

Help!!!!!

Regards !

Labels (1)
1 Solution

Accepted Solutions
arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Matias,

Try to load only those data where date(Start) = Date(Finsh) in Script level. And check the  Simple Straight table.


Name and Sum(Number)


Thanks ,

Arvind Patil

View solution in original post

5 Replies
pathiqvd
Creator III
Creator III

sum({<Start={"=Start=Finish"}>}Number)

arvind_patil
Partner - Specialist III
Partner - Specialist III

Hi Matias,

Try to load only those data where date(Start) = Date(Finsh) in Script level. And check the  Simple Straight table.


Name and Sum(Number)


Thanks ,

Arvind Patil

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Hi Matias,

you could try adding a flag when you load your qvd

if(Start=Finish, 1, 0) as StartEqualsFinish

You can then use this in an expression

sum({$<StartEqualsFinish={'1'}>} Number)

Marcus

Kushal_Chawda
MVP
MVP

may be like this


sum({<Start=p(Finish)>}Number)

Anonymous
Not applicable
Author

Thank you very much for yours answers!!!