# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
cancel
Showing results for
Did you mean:
Contributor III

## Calcul dynamique

J'aimerais calculer le ratio en fonction du customer nationality country/nombre total => exemple nombre de client china/compte client => 42% =>

count(
{<
\$(var_Customer_Begin_Date_Saleforce)={"<=\$(var_Date_Sel)"}, \$(var_Customer_End_Date_Saleforce)={">=\$(var_Date_Sel)"},
\$(var_Report_Date), \$(var_Reporting_Currency),[Customer Nationality Country] = {'China Mainland'}
>}
distinct\$(var_Customer_Key_Saleforce)
)
/
count(
{<
\$(var_Customer_Begin_Date_Saleforce)={"<=\$(var_Date_Sel)"}, \$(var_Customer_End_Date_Saleforce)={">=\$(var_Date_Sel)"},
\$(var_Report_Date), \$(var_Reporting_Currency)
>}
distinct\$(var_Customer_Key_Saleforce)
)

Mais j'aimerais afficher le top 5 des pourcentages comme cela :

J'aimerais transformer le calcul dynamiquement pour ne pas avoir le china mais je ne sais pas comment

Pouvez vous m'aider?

Merci!

Labels (1)
• ### expression

1 Solution

Accepted Solutions
Champion III

Use the TOTAL keyword

=count(

{<

\$(var_Customer_Begin_Date_Saleforce)={"<=\$(var_Date_Sel)"}, \$(var_Customer_End_Date_Saleforce)={">=\$(var_Date_Sel)"},

\$(var_Report_Date), \$(var_Reporting_Currency)

>}

distinct\$(var_Customer_Key_Saleforce)

)

/

count(

{<

\$(var_Customer_Begin_Date_Saleforce)={"<=\$(var_Date_Sel)"}, \$(var_Customer_End_Date_Saleforce)={">=\$(var_Date_Sel) "},

\$(var_Report_Date), \$(var_Reporting_Currency)

>}

distinct    TOTAL \$(var_Customer_Key_Saleforce)

)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
4 Replies
Champion III

Use the TOTAL keyword

=count(

{<

\$(var_Customer_Begin_Date_Saleforce)={"<=\$(var_Date_Sel)"}, \$(var_Customer_End_Date_Saleforce)={">=\$(var_Date_Sel)"},

\$(var_Report_Date), \$(var_Reporting_Currency)

>}

distinct\$(var_Customer_Key_Saleforce)

)

/

count(

{<

\$(var_Customer_Begin_Date_Saleforce)={"<=\$(var_Date_Sel)"}, \$(var_Customer_End_Date_Saleforce)={">=\$(var_Date_Sel) "},

\$(var_Report_Date), \$(var_Reporting_Currency)

>}

distinct    TOTAL \$(var_Customer_Key_Saleforce)

)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Champion III

Refer

https://community.qlik.com/t5/QlikView-App-Dev/Keywords-TOTAL-ALL-DISTINCT/m-p/143516

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Contributor III
Author

Thanks a lot !!!!!!

Champion III