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

Announcements
We are aware of an issue with the Product Downloads page and looking into it.
cancel
Showing results for 
Search instead for 
Did you mean: 
AT84Qlik
Contributor II
Contributor II

Insert data based on conditional date variables

Hi

I have a list of projects, which are all due to be delivered on a specific date, and which all have a specific size of people working on them.

When I do tables + sum the size by date, it will only display the size on that specific date. What I want, is a table which shows all of the months from Jan-Dec 19 (column headers), and anywhere the date stamp in my source table is less than those months, to sum the size value from the table.

I have tried setting vJan, vFeb as variables + then trying to calculate distance from those dates + estimated delivery date as another variable, I've tried running cross table to mix dates + size, and I've tried entering interval match but I don't understand it + it doesn't like the code. If anyone can help me figure out a way to do this, it would be much appreciated, as have spent weeks on this so far and I'm completely lost

3 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this: sum(size * Round( DayNumberOfYear([specific date])*12/365.2425))

talk is cheap, supply exceeds demand
AT84Qlik
Contributor II
Contributor II
Author

Thanks Gysbert -  I tried adding this as a master dimension though and it says it's invalid, even though the syntax help said the expression was 'OK'

I think that's the problem though, I don't know where to put this to get it to work, should it actually be a variable? or a Load script?

Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

That's because it's not a dimension. It's a measure. You can't use that expression as a dimension. Please post a small qlikview .qvw document or a qlik sense .qvf app that explains what you're trying to do.

talk is cheap, supply exceeds demand