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

Announcements
ALERT: QlikView server communication interruptions following Microsoft Windows Domain Controller security updates
cancel
Showing results for 
Search instead for 
Did you mean: 
techvarun
Specialist II
Specialist II

Sum by catogary

I have a staraight table with the following fields and i need to display the difference of

sum(totalamaunt) where catogay cost   and

sum(totalamount) where catogary Payable

Thanks  in advance

Labels (1)
4 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

     Remove the dimension Category and add this expressions.

     1. Sum({<Category = {"Costs"}>}TotalAMount)

     2. Sum({<Category = {"Payable"}>}TotalAMount)

     3. Column(1) - Column(2)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
techvarun
Specialist II
Specialist II
Author

Hi Kaushik Solanki,

                           It Works here is my final Script

                      =(Sum({<Category={'Costs'}>} [Total (Amount)]) - Sum({<Category={'Revenue'}>} [Total (Amount)]))

Regards

techvarun
Specialist II
Specialist II
Author

One more question what if i need to add one more condition like the month should be may?


Regards

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

HI,

     Then it will be something like this.

      Sum({<Category = {"Costs"},Month = {"May"}>}TotalAMount)

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!