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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
mcmahon160
Contributor II
Contributor II

Last 30 Days Calculation

I am trying to sum the last 30 days of our business. I typed the following set expression and I get a 0 balance.

mcmahon160_0-1630601557639.png

 

 

Any help would be appreciated. Thanks

 

 

 

9 Replies
Thiago_Justen_

*Edited*

 

You could try:

30 days from max GamingDt date :

Sum({<GaminDt = {">=$(=Date(Max(GamingDt)-30))"} >} TotalTheoWin)

 

30 days from today:

Sum({<GaminDt = {">=$(=Today()-30"} >} TotalTheoWin)

 

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
mcmahon160
Contributor II
Contributor II
Author

I tried it and it didn't work.  At least when I typed it my way, I got this on the bottom.

 

mcmahon160_0-1630605972068.png

Thiago_Justen_

I've edited post above. Please give a try.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
mcmahon160
Contributor II
Contributor II
Author

So I used some of your formulas to modify my formula and to make the following:

30 Days from Today:

Sum({<GaminDt = {">=$(=Date(Max(GamingDt)-30))"} >} TotalTheoWin)

Now it's showing the total amount as if the set expression is not there but it's not a 0.

I appreciate you taking the time to help.

mcmahon160
Contributor II
Contributor II
Author

I noticed there was an error in my previous formula. The GamingDt was spelled incorrectly. I used the following formula and I got a 0 in the total again.

Sum({<GamingDt = {">=$(=Date(Max(GamingDt)-30))"} >} TotalTheoWin)

Thiago_Justen_

Are you able to give us a mockup? I'm worry about GamingDt field format.

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
mcmahon160
Contributor II
Contributor II
Author

The set expression I used above is the one I am currently using. Is there anything else you need?

Thiago_Justen_

What is GamingDt format?

Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
mcmahon160
Contributor II
Contributor II
Author

GamingDt is in Date format.