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

Announcements
Learn how to migrate to Qlik Cloud Analytics™: On-Demand Briefing!
cancel
Showing results for 
Search instead for 
Did you mean: 
NavinReddy
Creator II
Creator II

Max Month

Dear All,

I have Data it has only Feb data

but i need to show current month is FEB only 2014, i have 2013 and 2014 data also

How Can i Feb Data Like Current Month

Im Using Max(Month) its not working i want to show in expression current month data

Please find the attechment

Thanks in Advance

Niranjan

7 Replies
its_anandrjs
Champion III
Champion III

Use months  =month(AddMonths(Today(),-1))

chiru_thota
Specialist
Specialist

Max(Month) won't work as it is not a numeric value.

Maintain one more column called MonthNo and use it in your expression.

Ex : Load Inline

     [

Month,MonthNo

Jan,1

Feb,2

.......

swuehl
MVP
MVP

I think the way to go here is not using only the month name (or month name and year in separate fields), but create a field that is in fact a date (like a monthstart), you can create such a field e.g. by using

makedate(YearField, MonthField) as MonthStart,

in your load script (MonthField needs to be numeric here).

Then max(MonthStart) will select the records for the current month.

its_anandrjs
Champion III
Champion III

Add one more field as a Year then you you have to check max date.

NavinReddy
Creator II
Creator II
Author

yes i used same expression but if they delay one month means

current month it will disply blank

NavinReddy
Creator II
Creator II
Author

Hi Swuehl,

This expression fetching both the month values how can i fetch only

FEB Month

Please help me

Sum({1<Month={"<=$(=Max(Month))"},Year={'2014'}>}PAY_AMT)

Thanks,

Niranjan

NavinReddy
Creator II
Creator II
Author

  Hi Anand,

Where can i add year field

Thanks,

Niru