Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Rebel
Contributor II
Contributor II

Seek Help with Formulas

Hello board, I'm still fairly new to Qlik Sense.  I've been searching the forums and online help, but have not yet found a suitable solution.

My data contain month-end balances for each month-end date.  In a table, I have the list of month-end dates and the corresponding month-end balance.

I want to create 2 more columns:

  • a column to show the balance change from the prior month (e.g., the row for April 2018 would calculate the balance change from March 2018 to April 2018);
  • a column to show the balance change from the prior year-end (e.g., the row for June 2018 would calculate the balance change from December 2017 to June 2018).

I'm having difficulty creating the formulas needed to add these 2 columns in the table.  Any help would be appreciated.

Sample data:

needhelpQlik.PNG

Thank you!

1 Solution

Accepted Solutions
zzyjordan
Creator II
Creator II

Hi, Rebel

You can add below script in your load script to calculate your month end difference and year end difference

"Month-End Balance"-Peek("Month-End Balance") as "Month-End Diff",
"Month-End Balance"-Peek("Month-End Balance",-1*Num(Month("Month-End Date"))) as "Year-End Diff"

And sample result for your reference.

Untitled.jpg

Hope this helps

ZZ

View solution in original post

2 Replies
zzyjordan
Creator II
Creator II

Hi, Rebel

You can add below script in your load script to calculate your month end difference and year end difference

"Month-End Balance"-Peek("Month-End Balance") as "Month-End Diff",
"Month-End Balance"-Peek("Month-End Balance",-1*Num(Month("Month-End Date"))) as "Year-End Diff"

And sample result for your reference.

Untitled.jpg

Hope this helps

ZZ

Rebel
Contributor II
Contributor II
Author

ZZ, thank you!