Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Alex
Contributor II
Contributor II

null subtotal in pivot table with pick match

Hi all,

Do you know how can I calculate the subtotal value within a pivot table using pick match in the expression?

The subtotal is OK when I select one possible value defined in the match function, but if I do not select any or more than one I get a null.subtotal null.PNG

 

subtotal ok.PNG

 

 

Set analysis:
pick(Match(Fiscal_Year_Quarter,$(=concat(distinct chr(39) & Fiscal_Year_Quarter & chr(39), ','))
),
sum({< InstallationDate={"$(= '>=' & Date(PurgeChar(SubField(vQuarterStartDates,',',1),chr(39)),'DD/MM/YYYY 00:00:00') & '<' & Date(Addmonths(PurgeChar(SubField(vQuarterEndDates,',',1),chr(39)),1),'DD/MM/YYYY 00:00:00'))"}, Month_Date={$(=vQuarterEndDates)} >}SerialNbrItemQty),
sum({< InstallationDate={"$(= '>=' & Date(PurgeChar(SubField(vQuarterStartDates,',',2),chr(39)),'DD/MM/YYYY 00:00:00') & '<' & Date(Addmonths(PurgeChar(SubField(vQuarterEndDates,',',2),chr(39)),1),'DD/MM/YYYY 00:00:00'))"}, Month_Date={$(=vQuarterEndDates)} >}SerialNbrItemQty),
sum({< InstallationDate={"$(= '>=' & Date(PurgeChar(SubField(vQuarterStartDates,',',3),chr(39)),'DD/MM/YYYY 00:00:00') & '<' & Date(Addmonths(PurgeChar(SubField(vQuarterEndDates,',',3),chr(39)),1),'DD/MM/YYYY 00:00:00'))"}, Month_Date={$(=vQuarterEndDates)} >}SerialNbrItemQty),
sum({< InstallationDate={"$(= '>=' & Date(PurgeChar(SubField(vQuarterStartDates,',',4),chr(39)),'DD/MM/YYYY 00:00:00') & '<' & Date(Addmonths(PurgeChar(SubField(vQuarterEndDates,',',4),chr(39)),1),'DD/MM/YYYY 00:00:00'))"}, Month_Date={$(=vQuarterEndDates)} >}SerialNbrItemQty),
sum({< InstallationDate={"$(= '>=' & Date(PurgeChar(SubField(vQuarterStartDates,',',5),chr(39)),'DD/MM/YYYY 00:00:00') & '<' & Date(Addmonths(PurgeChar(SubField(vQuarterEndDates,',',5),chr(39)),1),'DD/MM/YYYY 00:00:00'))"}, Month_Date={$(=vQuarterEndDates)} >}SerialNbrItemQty))

Thanks!

10 Replies
Alex
Contributor II
Contributor II
Author

Excellent! Now it's working!

Thanks a lot :)!