Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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.

10 Replies
sunny_talwar

May be this

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

rachel_delany
Creator II
Creator II

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

Thiago_Justen_

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
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Anonymous
Not applicable
Author

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])

Anonymous
Not applicable
Author

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?

sunny_talwar

May be this

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

Anonymous
Not applicable
Author

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 ?

Anonymous
Not applicable
Author

Thank  you for your quick response.

but the result is "0".

Thiago_Justen_

You could try this:

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

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