Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Total of Cost to Date by Month Question

Here is my problem. I have a field (ExtendedCostPrice) that I need to sum through the date selected in my app.  I'm using

Sum({<OrderDate={"<=$(=Max([Transaction Date]))"}> } ExtendedCostPrice)

to achieve this.  This works fine as long a I display only one month.  The problem is I need to display this value over time (Month/Year) in a pivot table so month to month changes can be displayed.  This function gives me the same value for every month (the most recent month).  I need to have the function sum each month individually for this to work.  Any help would be appreciated.

Like this:

Example.jpg

2 Replies
MK_QSL
MVP
MVP

Provide your sample data please....

Not applicable
Author

The dataset is as simple as this:

OrderDate1, ExtendededCostPrice1

OrderDate2, ExtendededCostPrice2

OrderDate3, ExtendededCostPrice3

OrderDate4, ExtendededCostPrice4

When the user selects a date (they selected month and year) that encompasses only OrderDate3 (and not OrderDate1` or OrderDate2) for example, it returns the sum or ExtendedCostPrice1 through ExtendedeCostPrice3.  This works fine as long as I only try to display one month/year in my dashboard. However, when I try to display a pivot table with multiple months/year as a dimension, it displays the same value for each month.  I would like to display.

Month 1, Sum(ExtendededCostPrice1)

Month 2, Sum(ExtendededCostPrice1 through 2)

Month 3, Sum(ExtendededCostPrice1 through 3)

Month 4, Sum(ExtendededCostPrice1 through 4)

I'm trying to calculate the value of inventory by starting at date zero, and summing all the positive and negative transactions to get the value at any point in time.