Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Talk to Experts, a LIVE Q&A Webinar. Bring your Qlik Sense Business questions on Aug. 4th. Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor III
Contributor III

Totals in pivot Table not working with IF statement

I am trying to count the frequency of visits of clients based on if they made a transaction on any day.

 


if ( (Count(distinct ( ([TRANSACTION]) )))>1,1, (Count(distinct ( ([TRANSACTION]) ))) )

 

I put that in a pivot table, it shows me what i want in the pivot table but the totals always =1

How can I fix it so that the totals show their sum of visits per day

 
Labels (3)
2 Replies
Highlighted
Specialist III
Specialist III

Re: Totals in pivot Table not working with IF statement

if ( (Count(distinct ( ([TRANSACTION]) )))>1,1, (Count(distinct ( ([TRANSACTION]) ))) )

 

count({<TRANSACTION={"=count(distinct TRANSACTION)>1"} TRANSACTION)

 

Channa
Highlighted
Contributor III
Contributor III

Re: Totals in pivot Table not working with IF statement

Much apreciated you reaching out
The formula gave me an error,

But I fixed it like this
Count ({< [TRANSACTION]={"=count( distinct [TRANSACTION])>1"}>} [TRANSACTION] )
But it just gives me a zero.

Removing Distinct works but it shows multiple values ( normal because a Client might do multiple transacctions in the same day)
Count ({< [TRANSACTION]={"=count( [TRANSACTION])>1"}>} [TRANSACTION] )

But i need it to show unique values to count the visits a client does withing a time period

I tried it with count (distinct [days]) but the totals still don´t sum the values