# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources. READ DETAILS
cancel
Showing results for
Did you mean:
Contributor II

## simplify set expression for pivot tables

is there  anyway we can simplify the following function for pivot table. it takes too long t load the entire data in the pivot table. i thought there will be a solution to make it dynanmic if i was able to simplify the following equation

if(SecondaryDimensionality()=0 and ColumnNo()=0,
If(Dimensionality()>=0,

-1*(1-(1-(sum({<missing_responsability_2={1},ref_date={">=\$(=Date(WeekStart(Max(ref_date), 0, 0),'DD/MM/YYYY'))<=\$(=Date(WeekEnd(Max(ref_date), 0, 0),'DD/MM/YYYY'))"}>}QteManq*nb_cu_per_case)/(sum({<ref_date={">=\$(=Date(WeekStart(Max(ref_date), 0, 0),'DD/MM/YYYY'))<=\$(=Date(WeekEnd(Max(ref_date), 0, 0),'DD/MM/YYYY'))"}>}QteManq*nb_cu_per_case)+sum({<ref_date={">=\$(=Date(WeekStart(Max(ref_date), 0, 0),'DD/MM/YYYY'))<=\$(=Date(WeekEnd(Max(ref_date), 0, 0),'DD/MM/YYYY'))"}>}QteSort*nb_cu_per_case))))
/(1-(sum({<missing_responsability_2={1},ref_date={">=\$(=Date(WeekStart(Max(ref_date), -1, 0),'DD/MM/YYYY'))<=\$(=Date(WeekEnd(Max(ref_date), -1, 0),'DD/MM/YYYY'))"}>}QteManq*nb_cu_per_case)/(sum({<ref_date={">=\$(=Date(WeekStart(Max(ref_date), -1, 0),'DD/MM/YYYY'))<=\$(=Date(WeekEnd(Max(ref_date), -1, 0),'DD/MM/YYYY'))"}>}QteManq*nb_cu_per_case)+sum({<ref_date={">=\$(=Date(WeekStart(Max(ref_date), -1, 0),'DD/MM/YYYY'))<=\$(=Date(WeekEnd(Max(ref_date), -1, 0),'DD/MM/YYYY'))"}>}QteSort*nb_cu_per_case)))))
, num(sum({<missing_responsability_2={1},Année={'=Year(max(ref_date))'}>}QteManq*nb_cu_per_case)/(sum({<Année={'=Year(max(ref_date))'}>}QteManq*nb_cu_per_case)+sum({<Année={'=Year(max(ref_date))'}>}QteSort*nb_cu_per_case)),'# ##0,0%'))

,1-(sum({<missing_responsability_2={1}>}QteManq*nb_cu_per_case)/(sum(QteManq*nb_cu_per_case)+sum(QteSort*nb_cu_per_case))))

Labels (2)