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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total Column To Exclude Lines Of Data

Hi,

I am working on a project which will cut data at specific dates. The total column needs to exclude data which is logged against a date greater than the one chosen. For some reason I cannot get this to work.

I have attached an example file.

Many thanks in advance.

5 Replies
Not applicable
Author

Hi,

Need more clarity.

In the attached QVW file which date columns will be compared and cut the data. Cut the data means it should be zero .

Not applicable
Author

Hi,

Within the main data, there is a 'Date; which is the date of the cost. The 'End' or 'Expire' is the end date of the record.

The 'Cut' date is the 'Expire' date based upon the cut of months. For example, if the cut is 10 months then the Cut date will be the Expire date less 2 months.

What I am trying to do is to create a total column for all the costs, but exclude any costs which occur after the Cut date (where Date > Cut).

I hope this helps explain what am trying to do.

Many thanks

Not applicable
Author

Hi Ted,

Ideally you are trying to calculate the cost between the dates with the end date will be the date from the month you have choosen.

you can try in the expression in this way sum( If (Date> startdate(it can be the minimum date) and Date<=(date of the month you have choosen),cost))

Not applicable
Author

Hi,

I have just tried your suggestion , unfortunately this does not appear to work as it always gives the totals as 0.

Not applicable
Author

Hi,

I have had another attempt to get this to work. I have attached a new file which shows a working example, however this isn't in the format I want as it shows all the costs line by line (used 'No.' in dimension).

I only want to show the high level results sorted by 'Ref' (contained within example), however I still can't get the totals to add correctly.

Any ideas or help would be very much appreciated.

Many thanks in advance.