Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with previous month and date formatting and math

Any idea why the following occurs?

Expression1 (works):

Sum({$<[Time.Month ID] ={$(=Date(Max([Order.Receive Date]), 'YYYYMM'))}>} [Order.Request Value]) --returns 201008



Expression 2 (doesn't work: trying to figure out sntax to return 201007):

Sum({$<[Time.Month ID] ={$(=Date(Max([Order.Receive Date]), 'YYYYMM')-1)}>} [Order.Request Value]) -returns 40394

Any help would be appreciated!

Thanks,

Dan



1 Solution

Accepted Solutions
spsrk_84
Creator III
Creator III

Hi,

I tried in another way to get the required o/p

=

Date(AddMonths((TODAY()),0),'YYYYMM') IT returns 201008



=

Date(AddMonths((TODAY()),-1),'YYYYMM') It RETURNS 201007

I think u need to implement the same sort of logic to get the desired output in your case..

Check in this way Hope it works...........

CheersBig Smile

Ajay



View solution in original post

1 Reply
spsrk_84
Creator III
Creator III

Hi,

I tried in another way to get the required o/p

=

Date(AddMonths((TODAY()),0),'YYYYMM') IT returns 201008



=

Date(AddMonths((TODAY()),-1),'YYYYMM') It RETURNS 201007

I think u need to implement the same sort of logic to get the desired output in your case..

Check in this way Hope it works...........

CheersBig Smile

Ajay