Qlik Community

QlikView Documents

Documents for QlikView related information.

how calculate DOD and MOM in straight table

nazaninegogo
New Contributor III

how calculate DOD and MOM in straight table

Dears

I want to calculate of DOD (20181202-20181201/20181201) and MOM f my REVENUE trend based on each service and date_key

but my expression is not working 😞

would you please help me in this regards:

Dimension: DATE_KEY, SERVICE_NAME

Expression

sum({<DATE_KEY={"$(=Date(max(DATE_KEY),'YYYY-MM-DD'))"}REVENUE)- sum({<DATE_KEY={">=$(=Max(DATE_KEY)-1)<=$(=Max(DATE_KEY))"}REVENUE)/sum({<DATE_KEY={">=$(=Max(DATE_KEY)-1)<=$(=Max(DATE_KEY))"}REVENUE) * 100

 

Labels (3)
Comments
UserID2687
New Contributor III

Try with this for MOM 🙂

sum({<[DATE_KEY.autoCalendar.Date]={"<=$(=MonthEnd(Max(Date([DATE_KEY.autoCalendar.Date]))))>=$(=MonthStart(Max(Date([DATE_KEY.autoCalendar.Date]))))"}>}REVENUE) -

sum({<[DATE_KEY.autoCalendar.Date]={"<=$(=MonthEnd(Addmonths(Max(Date([DATE_KEY.autoCalendar.Date])),-1)))>=$(=MonthStart(Addmonths(Max(Date([DATE_KEY.autoCalendar.Date])),-1)))"}>}REVENUE)

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2018-12-03 05:45 AM
Updated by: