Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Set Analysis not working as expected

Currently using the following expression to try and create a static value for a table to only show a single day of data.

Field names are different for the sake of privacy.

=sum({<MYCUSTOMDATE={"=date(Today()-1)"}>}MARBLECOUNTFIELD)

The table has 3 fields. Date, Marble count, and location. 

The plan is to show all marble counts for each location yesterday. 

But using the expression above gives all marble counts for all locations for all time periods. Until filtered on manually. We need the count to show yesterday's values only and not change when the user filters and selects data elsewhere. This will be used in a Nprinting report so having it preset for Nprinting to send out will be vital.

 

Happy to take any thoughts/questions

 

Thanks,

Analyst

 

 

2 Replies
Highlighted
Partner
Partner

Try this (assuming that your default date format is  in the same format as MYCUSTOMDATE):

=sum({<MYCUSTOMDATE={'$(=DayName(Today(),-1))' }>}MARBLECOUNTFIELD)

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Specialist III
Specialist III

Hi Analyst240,

Today()-1 will give you DD-MM-YYYY Format. So, make sure your Date Field (MYCUSTOMDATE) must be in that Format.

Use this Code:

=Sum({1<MYCUSTOMDATE= {'$(=Date(Today() - 1))'}>} MARBLECOUNTFIELD)

See the Final Result:

Desired  OutputDesired Output

 

Regards,

Av7eN