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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Grand total for two measures

Hi all,

I have two measures  order1 and order2 with the below formula in a table.

How can display the sum of both measures(grand total) in another column?

Order 1

if(GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)=0 ,

Sum({<calendar_current_month_offset={'$(vInventory)'},report_metric_key={'7'}, supply_orders_status_code = {'4','6'}>}ord_current_qty_base),

if(GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)>0 ,

sum({<calendar_current_month_offset={'$(vInventory)'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'},

supply_orders_status_code = {'4','6'}>}ord_current_qty_base),

if((GetSelectedCount([Month])>0 or GetSelectedCount([Fiscal Year])>0) and GetSelectedCount(Req_GI_Date)=0 ,

sum({<calendar_year_month ={'$(=Max(calendar_year_month))'},report_metric_key={'7'}, supply_orders_status_code = {'4','6'}>}ord_current_qty_base),

Sum({<calendar_year_month ={'$(=Max(calendar_year_month))'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'}, supply_orders_status_code = {'4','6'}>}ord_current_qty_base)

)

)

)

Order 2

if(GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)=0 ,

sum({<calendar_current_month_offset={'$(vInventory)'},report_metric_key={'7'},supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base),

if (GetSelectedCount([Month])=0 and GetSelectedCount([Fiscal Year])=0 and GetSelectedCount(Req_GI_Date)>0 ,

sum( {<calendar_current_month_offset={'$(vInventory)'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'},

supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base),

if((GetSelectedCount([Month])>0 or GetSelectedCount([Fiscal Year])>0) and GetSelectedCount(Req_GI_Date)=0 ,

sum({<calendar_year_month ={'$(=Max(calendar_year_month))'},report_metric_key={'7'},

supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base),

sum( {<calendar_year_month ={'$(=Max(calendar_year_month))'},Req_GI_Date={'<=$(=vReq_GI_Date)'},report_metric_key={'7'},

supply_orders_status_code = {'1','2','3'}>}ord_current_qty_base)

)

)

)

Thanks

Bhawana

2 Replies
Not applicable
Author

Hi Bhawana,

You could add another expression with these 2 expressions combined and display it. If you would like to leverage the default Totals, then i guess it adds up only in the last/top row. 

Thanks!

Arun

Anonymous
Not applicable
Author

Thanks.....It works.