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

Sum Sales of CurrentDate and PrevDate

I am loading data with

EDW:

LOAD date(Date-1) as prevDate,

      Date,

     [Business Area Code],

     [Closing Balance USD]

FROM...

Calendar:

LOAD

date(Date-1) as prevCalDate,

      Date,

     [Document Date],

     [PGS Date],

     [Close WD],

     [Close Period],

     [Period WD],

     [Calendar Month],

     FY

FROM...

I need to have a Straight Table to show the Current Date -Current Date Balance - Previous Date - Previous Date Balance.

The expression that I am using is returning the same balance as the Current Date.

(sum({$<prevDate=p({$<prevDate>}prevDate)>}[Closing Balance USD]).

Below is a look at the Straight Table.

stable.png

Here is what the totals should be:

stable_excel.png

Attached is the Data file:

Thanks!

Dan

5 Replies
swuehl
MVP
MVP

Try

sum({$<Date=p(prevDate)>} TOTAL [Closing Balance USD])


This will probably only work with a single Date selected.

Anonymous
Not applicable
Author

Thank you Swuehl, worked perfectly!

Anonymous
Not applicable
Author

Swuehl,

I now have another need for the Previous Month to the Date to sum up [Closing Balance USD].

Can you help?

Anonymous
Not applicable
Author

Thank You Swuehl!

I tried a few combinations and it did not provide any $$ amounts.