Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
dmk223
Contributor II
Contributor II

Current month

Hello i'm trying to create a field which will "predict" shop monthly revenue based on current average revenue. In other words im taking revenue from current month and divide it by days that have already passed. Then im multiplying this number by number of days that there are in month.

So it look like this :
((Sum({<[Shop]={'ABC'},Yearx={'2022'},[Monthx]={'May'}>} [Revenue]))/(day(today())-1))*31


So as you can see i have put manually year, month and number of days in a month. i would like to automate this so i won't have to change it every month 🙂

But i cant figure it out

I've tried with [Monthx]=month(today()) but it doesnt work...

Labels (2)
1 Reply
dmk223
Contributor II
Contributor II
Author

I have found a solution it might be a bit sloppy but it worked

 

((Sum({<[Shop]={'ABC'},[Sale_date]={"=[Date]>=MonthName(Today())"}>} [Revenue]))/(day(today())-1))*(MonthEnd(today())-Monthstart(today()))