11 Replies Latest reply: Nov 20, 2017 2:05 PM by Russell Glenn

# Current Month Revenue Display

Good morning everyone,

I have revenue data from two different months. When I go into my Qlik Sense sheet, my revenue formula sums the two months together until I choose a specific month with my filter pane. Is there a way I can write into the formula to automatically select the current month or max month when the revenue data is unselected?

I assume this can be done with a set modifier pointing to latest, current, or max month?

Thanks everyone!

• ###### Re: Current Month Revenue Display

I tried this equation, but I just get all zeros across my revenue column data...

=sum({<Month={"=\$(=Max(Month))"}>}Revenue)

• ###### Re: Current Month Revenue Display

Try

sum({<Month={"\$(=Max(Month))"}>}Revenue)

• ###### Re: Current Month Revenue Display

Still getting zeros here

• ###### Re: Current Month Revenue Display

Try this

sum({<Month={"\$(=MaxString(Date#(Month,'MMM')))"}>}Revenue)

• ###### Re: Current Month Revenue Display

Yes! This works…what is this doing? How does this assign which is must current? Our months are only assigned by Month names….like November, December etc…

• ###### Re: Current Month Revenue Display

Hi,

try like this,

num(Month(Date)) as Month# // update your date field name here

create Measure like below using set analysis expression

sum( {\$<Year={"\$(=max(Year))"},Month# ={"\$(=max(Month#))"}>} Revenue)

Thanks,
Deva

• ###### Re: Current Month Revenue Display

Hi There, my date field name is just Month, so in the "update your date field name here" reference you made above, would I just type Month in for that?

Thanks!

• ###### Re: Current Month Revenue Display

hi,

in this case, simply try like this way

Sum({<Month = {\$(=MaxString(Month))}>}Revenue)

• ###### Re: Current Month Revenue Display

The numbers are not lining up exactly when I select the month versus when I unselect all….but I am getting numbers

• ###### Re: Current Month Revenue Display

hi,

can you share your mock data and expected output in excel format. tks

• ###### Re: Current Month Revenue Display

So this is giving the previous month, not the latest for some reason….