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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
eprehu
Contributor III
Contributor III

Qliksense to SQL

Hey, 

I need to translate a qliksense code to a sql request.

Here the qliksense code to calculate the new customer WTD :

sum({<[Report Date]>}
if(
aggr({<[Report Date]>}
sum(
{<
[Report Date], $(var_Reporting_Currency),
$(var_Customer_Begin_Date_Saleforce)={"<=$(var_Date_Sel)"}, $(var_Customer_End_Date_Saleforce)={">=$(var_Date_Sel_WTD)"},
[Customer First Purchase Date]={">=$(var_Date_Sel_WTD) <=$(var_Date_Sel)"}
//[Customer Creation Date]={">=$(var_Date_Sel_Deb) <=$(var_Date_Sel)"}
>}
[Recruited Flag]
)=1,
[Customer Key]
),
1,
0
)
)

eprehu_0-1648025306436.png

eprehu_1-1648025332286.png

 

Thanks !

Labels (3)
0 Replies