Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Limiting Chart to show only data at most recent date in data table.

Is there any way I can limit a chart to only show the data in the current date (date provided on my computer)?

I have accumulated data is time stamped each day. Right now, my chart is adding all the data together but I only need to pull the data from the most recent date in my data table.

Below is my script.

[Main Data]:

LOAD [Country Name],

     [Country Code],

     [Sync State],

     Count,

     [Creation Date/Time],

   

    Timestamp#(date(date#(mid([Creation Date/Time], 1, 16), 'YYYY/MM/DD hh:mm'), 'YYYY')) as Year,

  Timestamp#(date(date#(mid([Creation Date/Time], 1, 16), 'YYYY/MM/DD hh:mm'), 'MMM')) as Month,

  Timestamp#(date(date#(mid([Creation Date/Time], 1, 16), 'YYYY/MM/DD hh:mm'), 'DD')) as Day,

  Timestamp#(date(date#(mid([Creation Date/Time], 1, 16), 'YYYY/MM/DD hh:mm'), 'MMM/DD')) as MonthDay

FROM

5 Replies
MarcoWedel

Hi,


add

date(date#(left([Creation Date/Time], 10), 'YYYY/MM/DD'), 'YYYY/MM/DD') as CreationDate

to your load script


and add the set expression

{$<CreationDate={'$(=date(now(),'YYYY/MM/DD'))'}>}

to your expressions


QlikCommunity_Thread_111594_Pic1.JPG.jpg


regards


Marco

Not applicable
Author

Thank you. The only Definition I have is: sum(if([Migration State]='Attempted',Count))/1000000

Where do I add the below expression exactly?

{$<CreationDate={$(=date(now(),'YYYY/MM/DD'))}>}

MarcoWedel

try

sum({$<CreationDate={'$(=date(now(),'YYYY/MM/DD'))'}, [Migration State]={'Attempted'}>}  Count)/1000000

instead of

sum(if([Migration State]='Attempted',Count))/1000000


regards


Marco

Not applicable
Author

I'm sorry. This didn't work...

No values are appearing when paste this into my expression.

Not applicable
Author

The formula doesn't have to be today's date (timestamp on computer) but just ensuring it's only taking data from the latest available date from the data (since the data is always cumulative).