Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
rt_new_user
Contributor III
Contributor III

Help with an expression?

Hello Users

I am struggling with an expression and hence need a little help.

My requirement is to show on the graph the sum of unique roamers in a country only from the previous day. Each country has a few carriers, so the expression should add Unique roamers for each carrier and show it as a total for that country (but only for yesterday date).

My graph 'Roamer count from yesterday' however is showing pretty much double the amount.  I am using the below expression:

Sum ( {<Date = {"$(=Date(Max(Date), 'DD/MM/YY'))"}>} Unique_Roamers)

Taking example of China in the picture below we should see '6276' unique roamers ( 2075+4201), but in the graph it is showing '12552' unique roamers.

The expression should only sum unique roamers from the date 17/03The expression should only sum unique roamers from the date 17/03China exampleChina example

Can you please help me troubleshoot my expression?

4 Replies
Andrew_Incite
Partner - Contributor II
Partner - Contributor II

Have you checked your underlying data to see if anything may be causing duplication? Try previewing the data model to see. The Set Analysis looks ok at first glance but I would put  

Date(Max(Date),'DD/MM/YY') and "$(=Date(Max(Date), 'DD/MM/YY'))" 

Into a text box to see if it gives you what you expect. 

 

rt_new_user
Contributor III
Contributor III
Author

Hi Thanks for your reply.



I have never used a text box expression. Is there a syntax?


Shubham_Deshmukh
Specialist
Specialist

Hi @rt_new_user ,

Let's make it simpler,

Create Variable :  vMaxDate = date(max(Date)) & Dimension : Country

=Sum(if(Date =vMaxDate,Unique_Roamers))

-Shubham

Andrew_Incite
Partner - Contributor II
Partner - Contributor II

Simply create a text box object and put the expressions in there, including the = sign.  It is a good troubleshooting technique to make sure whats going into the set analysis is what you expect.