Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

doreenhou
New Contributor

use expression to show current month value on Qlik Sense

Dear All,

please kindly help on the expression to show  current month volume.

please correct my below expression

I want to count the shipment volume for current month.

COUNT({$<[ETD.autoCalendar.Month] = "{(month(today()))}">} [OTM Shipment ID])

Please help. I tried many ways to do it but either '-' or '0"

Thank you for much.

9 Replies

Re: use expression to show current month value on Qlik Sense

May be this

Count({$<[ETD.autoCalendar.Month] = {"$(=Month(Today()))"}>} [OTM Shipment ID])

rachel_delany
Contributor

Re: use expression to show current month value on Qlik Sense

You could try setting the current month via a variable and referring to that instead.

thiago_justen
Valued Contributor III

Re: use expression to show current month value on Qlik Sense

To ensure you will get only current month's value, maybe this could be helpful:

Count ({<[ETD.autoCalendar.Date]={">=$(=MonthStart (Today ()))<=$(=MonthEnd (Today ()))"}>}[OTM Shipment ID])

Cheers

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
doreenhou
New Contributor

Re: use expression to show current month value on Qlik Sense

Hi Sunny, thank you so much for your answer. it works. may I know can I count the volume for last month as below.

Count({$<[ETD.autoCalendar.Month] = {"$((=Month(Today()))-1)"}>} [OTM Shipment ID])

doreenhou
New Contributor

Re: use expression to show current month value on Qlik Sense

Hi Thiago Teixeira,

Yes ! it works as well. but can I have one more question followed by this?

how to get last month value with this expression?

Re: use expression to show current month value on Qlik Sense

May be this

Count({$<[ETD.autoCalendar.Month] = {"$(=Month(AddMonths(Today()-1)))"}>} [OTM Shipment ID])

doreenhou
New Contributor

Re: use expression to show current month value on Qlik Sense

Dear Rachel Delany,

it's a great idea. but I'm beginner for qlik sense. actually I would like to find out the difference between this month and next month volume.

do you have any idea on this ?

doreenhou
New Contributor

Re: use expression to show current month value on Qlik Sense

Thank  you for your quick response.

but the result is "0".

thiago_justen
Valued Contributor III

Re: use expression to show current month value on Qlik Sense

You could try this:

Count ({<[ETD.autoCalendar.Date]={">=$(=AddMonths(MonthStart (Today ()),-1))<=$(=AddMonths(MonthEnd (Today ()),-1))"}>}[OTM Shipment ID])

Thiago Justen Teixeira Gonçalves
WhatsApp: 24 98152-1675
Skype: justen.thiago
Community Browser