Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Eugene007
Contributor
Contributor

Previous months data

Hi there

 

I am trying to set an expression to show my previous month data on a live report without setting any dates selection.

 

Please see current expression that needs to be edited:

SUM({<DateKey = {">=$(=Min({<FYP = {"$(=$(vCurrFYP))"}>} DateKey))<=$(=NUM(Date(vToday)))"}, FinancialCode =- {9999}, ProfitCentreCode = {2}, Date= >} RoomsSold)

 

Kind regards

Eugene

6 Replies
Chanty4u
MVP
MVP

try this

sum({<DateKey={">=DateKey(addmonths(Monthstart(max(DateKey),-1)))<=Date(addmonths(max(DateKey),-1))"}>}RoomsSold)

Eugene007
Contributor
Contributor
Author

Hi Chanty4u

I need to keep this part of the expression: FinancialCode =- {9999}, ProfitCentreCode = {2}, Date= >} RoomsSold)

 

Please advise the full expression?

Also, your expression made all the MTD values zero.

Eugene007_0-1614697312683.png

Please assist

Chanty4u
MVP
MVP

sum({<DateKey={">=DateKey(addmonths(Monthstart(max(DateKey),-1)))<=Date(addmonths(max(DateKey),-1))"},FinancialCode =- {9999}, ProfitCentreCode = {2}, Date= >}RoomsSold)

Eugene007
Contributor
Contributor
Author

Hi Chanty



Here is the report before any changes where I still have values:



[cid:image001.png@01D70F99.C6F38520]



Here I apply your expression:



[cid:image002.png@01D70F99.C6F38520]





This is the results, still zero values??



[cid:image003.png@01D70F99.C6F38520]



Please advise next steps?



Your assistance will be highly appreciated.



Kind regards




Eugene007
Contributor
Contributor
Author

Hi Chanty

 

Here is the report before any changes where I still have values:

 

Eugene007_0-1614706063092.png

 

 

Here I apply your expression:

 

Eugene007_1-1614706063361.png

 

 

 

This is the results, still zero values??

 

Eugene007_2-1614706063535.png

 

 

Please advise next steps?

 

Your assistance will be highly appreciated.

 

Kind regards

Eugene007
Contributor
Contributor
Author

Hi there, any feedback as yet please?