Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Ram83
Contributor II
Contributor II

Set Expression and Calculated Dimension

Hi,

I need Repeated Customers Analysis, how to write the Calculated Dimension for Only last visited Sales .

for Example,

In below mentioned table, Rank 3 is last visited sales.So, in Calculated Dimension I want display Rank 3 Record only.

 

RankDocNumDocDateCountyBBrandSegmentSales
1191110089507-05-196374860082PREETHIMIXE3100
2191110094308-05-196374860082CROMPTONAIRCOOLER5099.99
2191110094308-05-196374860082VENUSFAN1000
3191110129721-05-196374860082CROMPTONACCESSORIES390.01

 

I have written this Expression

=Aggr(if(Rank(Total Sum(LineTotal_WithTax))/Count(distinct{<CustPhoneNo = {"=Rank(Total count(distinct DocDate))=2"}>}CustPhoneNo),'2 Times'),CustPhoneNo)

its not working.

Anybody please help me. how to write the set expression and Calculated Dimension.

Labels (1)
3 Replies
sunny_talwar
MVP
MVP

Rank is not a field here?

Ram83
Contributor II
Contributor II
Author

Rank is not a field, that is the Rank function.

rkpatelqlikview
Creator III
Creator III

Hi Ram,

Did you try with Forstsortedvalue() in the expression? Is  Last visited determine with DocDate? If yes, i think we can achieve this with firstsortedvalue.