# QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us for a live Q&A! September 21, 10 AM ET - Onboarding Fast in Qlik Sense SaaS! REGISTER
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)