Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
nazaninslp
Contributor III
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
Creator III
Creator III

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
Contributor III
Contributor III
Author

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

tresesco
MVP
MVP

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

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

sibin_jacob
Creator III
Creator III

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

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

sunny_talwar

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
Contributor III
Contributor III
Author

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
Contributor III
Contributor III
Author

Dear Bala

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

do you have any suggestion?

balabhaskarqlik

Try this:

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