Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Please help with last year values

Hello Everyone,

Please help me into the below issue.


I am calculating the Last year values by using attached script, values are coming correct, But


when i am count of days, the day count is coming wrong,


lets say if i have data only for 7 days in Feb 2015, i should get count of days is 7, but my script is showing 28, it means it is for complete month.


Can you please tell me how to avoid this

Thank in advance, your valid reply will be great help to me.

Regards ,

Sreeharsha V

1 Solution

Accepted Solutions
Not applicable
Author

Hi Jonathan,

Thanks for the reply, i did it, but my scenario there would be possibility that the measure is having 0 value, i should not skip that day.

i tried like below:

i took one more date in the script without joining the date table, i used that in the set analysis by giving the condition like Date<MaxDate, the values are coming as expected

Thanks for the response

Regards,

Sreeharsha V

View solution in original post

5 Replies
Not applicable
Author

Any Luck from anybody

jonathandienst
Partner - Champion III
Partner - Champion III

Where are you calculating a day count? I dont see it in your script.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hello Jonathan,

I am calculating day count at application level by using count(Date).

Thanks

jonathandienst
Partner - Champion III
Partner - Champion III

Then use a set expression or if expression to only count dates that have values against them

     Count(If(Value<>0 , Date))

If you need more help with expressions, provide more information about the data model rather than the load script.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Hi Jonathan,

Thanks for the reply, i did it, but my scenario there would be possibility that the measure is having 0 value, i should not skip that day.

i tried like below:

i took one more date in the script without joining the date table, i used that in the set analysis by giving the condition like Date<MaxDate, the values are coming as expected

Thanks for the response

Regards,

Sreeharsha V