Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
New to qlik sense, I have a dataset like the one below, where I need to summarize last month's sales.
My result should be Sales for last month-> March 2016 = $78
How can I do this in a set analysis?
I have tried sum ({< [Month Year] = {'$(=Max(Date))'} >} [Sales]) but no luck.
Customer | Month Year | Sales |
A | 1/1/16 | $10 |
B | 1/1/16 | $11 |
C | 1/1/16 | $12 |
D | 1/1/16 | $13 |
A | 2/1/16 | $14 |
B | 2/1/16 | $15 |
C | 2/1/16 | $16 |
D | 2/1/16 | $17 |
A | 3/1/16 | $18 |
B | 3/1/16 | $19 |
C | 3/1/16 | $20 |
D | 3/1/16 | $21 |
Can you tie a master calendar to the date field then use set analysis to filter by month and year?
Something similar to SUM({<[Year]={$(=Year(Today()))}, [Month]={$(=Month(Today()))}>} Sales)
Try like:
sum ({< [Month Year] = {'>=$(=MonthStart(Max(Date))) <=$(=MonthEnd(Max(Date)))'} >} [Sales])
Hello Monica,
Trust that you are doing well!
Please refer below given expression:
=Num(Sum({<[Month Year]= {'$(=Date(Max([Month Year]), 'M/D/YY'))'}>}Sales), '$#,##0;($#,##0)')
Hope this will be helpful.
Regards!
Rahul