Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

nazaninslp
New Contributor III

limit in expression(chart) to show just Today values

Hi Dears

would you please help me to show just values of today in expression?

is it possible?

for example I just want show todays new subscription in chart.

sum(new_subscription) per Categories

today()

something like below chart:

Capture.PNGtoday.PNG

Thanks

10 Replies
sibin_jacob
Contributor III

Re: limit in expression(chart) to show just Today values

You need use set analysis

create a variable vToday

Today()

Expression should be like this

Date_Column from your table

sum(<{Date_Column={'$(vToday)'}}>new_subscription)

nazaninslp
New Contributor III

Re: limit in expression(chart) to show just Today values

Dear Sibin

I got errors in expression:

SET vToday=Today();      define variable

sum(<{date_key={'$(vToday)'}}>new_subscription_count)            in expression

would you please help?

Capture.PNG

MVP
MVP

Re: limit in expression(chart) to show just Today values

One visible error - improper bracket ( > and } ) placement

sum(<{date_key={'$(vToday)'}>}new_subscription_count)

sibin_jacob
Contributor III

Re: limit in expression(chart) to show just Today values

it is a syntax error

sum(<{date_key={'$(vToday)'}>}new_subscription_count)


if your field is new_subscription, you need to use the same in expression, like below

sum(<{date_key={'$(vToday)'}>}new_subscription)


If it is not working, Please check the date format in vToday variable and date_key column.


balabhaskarqlik
Honored Contributor

Re: limit in expression(chart) to show just Today values

sum(<{date_key={"$(=max(date_key))"}>}new_subscriptions)

Re: limit in expression(chart) to show just Today values

In addition, the starting of set analysis is also a problem here

Capture.PNG

In addition to what Tresesco‌ showed, change the part highlighted in blue

sum({<date_key={'$(vToday)'}>} new_subscription_count)

nazaninslp
New Contributor III

Re: limit in expression(chart) to show just Today values

Dear Sibin

I have tried many times but it doesn't work, how can I check the date format of vToday.

would you please help more.

I also tried below expression as well but it worked wrongly and show all count of new subs .

Expression: sum({<date_key={"$(=max(date_key))"},Category-={"Test","Free ShortCode","Xtratime"}>} NEW_SUBSCRIPTION_COUNT)

Dimension: Category

nazaninslp
New Contributor III

Re: limit in expression(chart) to show just Today values

Dear Bala

it shows all of count of new subs not just todays value.

do you have any suggestion?

balabhaskarqlik
Honored Contributor

Re: limit in expression(chart) to show just Today values

Try this:

Sum({$<Date_Key = {"$(=Date(Today(), 'DD-MM-YYYY'))"}>} new_subscriptions)