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

Max (Period) - 1

Hi all,

I have a line chart that I dont want to show the current month because the lines just fall off the cliff.

my current formula is producing No data - I cant seem to find any syntax errors but I dont know why its not working?

Ideas?

formula is

=Num(Count({<

  Period = {"<=$(=Max(Period)-1)"}, Year = {"$(=Max(Year))"}>}ID),'#,##0')

1 Solution

Accepted Solutions
craigsutton
Creator
Creator

<Dimension -= another set>: remove the set from the current selection

=Num(Count({< Period -= {"$(=Max({1}Period))"}, Year = {"$(=Max(Year))"}>}ID),'#,##0')

View solution in original post

5 Replies
lironbaram
Partner - Master III
Partner - Master III

hi

what is the format of the period field ?

craigsutton
Creator
Creator

<Dimension -= another set>: remove the set from the current selection

=Num(Count({< Period -= {"$(=Max({1}Period))"}, Year = {"$(=Max(Year))"}>}ID),'#,##0')

leocattqv
Creator
Creator
Author

that worked, thanks so much

leocattqv
Creator
Creator
Author

One More Question - Say I dont want Period as before,  say I wanted Week.  Wouldnt it be the same calculation with a different field?  Im trying to cut to only the completed week

=Num(Count({<

  YearWeek -= {"$(=Max({1}YearWeek))"},Year = {"$(=Max(Year))"}>}ID)

craigsutton
Creator
Creator

Is it not working? if you have a field that labels each date be week of the year then it should work.