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: 
1600eads
Contributor III
Contributor III

Month to Month KPI on a dateformat MMM YYYY

I am having issues getting values returned for my equation to yield results for my month to month KPI. I was succesfully able to get results when my date was in the MM/DD/YYYY format but having issues with the MMM YYYY format. I am creating the Test Month field in the script. 

date(MonthStart(date#(date(daystart([Test Date]), 'MM/DD/YYYY'))), 'MMM YYYY') as [Test Month],

Wondering if anyone can take a look?

count({1<[Test Month]={$(=date(Max(date#([Test Month], 'MMM YYYY'))))}>} [Test Date])
- count({1<[Test Month]={$(=Max([Test Month])-1)}>} [Test Date]))
/ count({1<[Test Month]={$(=Max([Test Month])-1)}>} [Test Date])
 
Thank you gurus.
Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

@1600eads  try below

(count({1<[Test Month]={"$(=date(Max([Test Month]),'MMM YYYY'))"}>} [Test Date])
- count({1<[Test Month]={"$(=date(addmonths(Max([Test Month]),-1),'MMM YYYY'))"}>} [Test Date]))
/ count({1<[Test Month]={"$(=date(addmonths(Max([Test Month]),-1),'MMM YYYY'))"}>} [Test Date])

View solution in original post

2 Replies
Kushal_Chawda

@1600eads  try below

(count({1<[Test Month]={"$(=date(Max([Test Month]),'MMM YYYY'))"}>} [Test Date])
- count({1<[Test Month]={"$(=date(addmonths(Max([Test Month]),-1),'MMM YYYY'))"}>} [Test Date]))
/ count({1<[Test Month]={"$(=date(addmonths(Max([Test Month]),-1),'MMM YYYY'))"}>} [Test Date])

1600eads
Contributor III
Contributor III
Author

Thank you! Worked like a charm. Looks like I was missing the open and end quotes and obviously the date formatting that needed to happen on the other 2 expressions.