Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
mario-sarkis
Creator II
Creator II

Set analysis

Hey All ,

i have a question wish any of you can help

Here is my example

I have list of Clients ID with there balances i want to find the diffrence between last two months of balances need to show  it like this

[CliendID]       [Balance last month]    [Balance this Month]    [Difference Balance Between this and Last Month]

how can i creat these fields in a straight table

help pleas Thank you,

3 Replies
PrashantSangle

Hi,

Use Client ID as dimension,

Expression

1: Sum({<date={"$(=date(month(today())))"}>}[Balance])

2:Sum({<date={"$(=date(Addmonths(today(),-1)))"}>}[Balance])

3: Column(2) - Column(1)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
mario-sarkis
Creator II
Creator II
Author

Hi Max

Thank you for Your reply

in my data base i have till a specific date it is not a daily update it

instead of today() i need use the maximum Date i have in a field and in a second field the maximum date minus one month (in order to see the balance in the last month).

how should i write it in a set analysis.


Thank you,

PrashantSangle

Hi,

instead of today()

write max(date)

and if possible in script create MonthName from Date field

like monthName(Date) as Monthname

in expression

1: Sum({<MonthName={"$(=monthName(max(date)))"}>}[Balance])

2:Sum({<MonthName={"$(=MonthName(Addmonths(max(date),-1)))"}>}[Balance])

3: Column(2) - Column(1)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂