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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Jan_Wilmsen
Contributor
Contributor

Chart Row expression vs Totals Mode issue

Dears,

I hope the screenshot is self explaining.

My expression for column C is simply deviding 2 columns A and B by eachother 

The Total lines of column A and B are set to sum.

How to get the Total line of C to match the total of A / total of B.

I have tried with sum aggr total... but fail to get the result i am looking for.

thanks,

Jan

Screenshot - 4_29_2019 , 12_45_54 PM.png

13 Replies
Jan_Wilmsen
Contributor
Contributor
Author

Kushalthakral,

Sorry NOK... see attached demo2.qvw

If(Dimensionality() = 0,sum( total SCRAPPRICE)/sum(total OKCOEF),Sum(SCRAPPRICE)/Sum(OKCOEF)) gives me "-" on each row.

Replacing the column headers by full expressions gives me error "nested agregation"

If(Dimensionality() = 0,sum( total (SUM({<Type={'SCRAP'}>}Qty)*Price))/sum(total ((SUM({<Type={'Produced'}>}Qty)-SUM({<Type={'SCRAP'}>}Qty))*Coef)),Sum((SUM({<Type={'SCRAP'}>}Qty)*Price))/Sum(((SUM({<Type={'Produced'}>}Qty)-SUM({<Type={'SCRAP'}>}Qty))*Coef)))

I disabled this expression in qvw attached.

 

Thanks for your effort.

Jan

 

kushalthakral
Creator III
Creator III

Hi 

Can you please use the expression below

=If(Dimensionality() = 0,Sum(Total Aggr(SUM({<Type={'SCRAP'}>}Qty)*Price,Part,Coef)) / Sum(Total Aggr((SUM({<Type={'Produced'}>}Qty) - SUM({<Type={'SCRAP'}>}Qty))*Coef,Part,Coef)),SCRAPPRICE/OKCOEF)

 

Thanks

Kushal

Jan_Wilmsen
Contributor
Contributor
Author

clap.gif

=If(Dimensionality() = 0,Sum(Total Aggr(SUM({<Type={'SCRAP'}>}[#Defected parts amount])*#Price,Tool,#EQU)) / Sum(Total Aggr((SUM([#Produced parts]) - SUM({<Type={'SCRAP'}>}[#Defected parts amount]))*#EQU,Tool,#EQU)),SCRAPPRICE/OKEQU)

Screenshot - 4_30_2019 , 2_38_07 PM.png

Jan_Wilmsen
Contributor
Contributor
Author

Thank you Kushaltharal !