Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anahita
Contributor II
Contributor II

Sum data and group by variables

D44C3E46-12F1-4166-A3B8-C2BCD081ED63.png


I want to show sum(Amount) group by BGID and InsOfficeNodeID. and End user should select BranchName and BGName from a list. The problem is when BranchName is selected(for example ‘A’), the result is shown should be like this:
Sum(Amount) where : BranchName=’A’ and InsOfficeNodeID= ParentID
I don’t know how to do

Labels (3)
6 Replies
PrashantSangle

Can you provide some sample data & expected result of it.

If your data model is same which you share in above image. then you just need to create straight table

with dimension > BGID, InsOfficeNodeID,

Expression: Sum(if(InsOfficeNodeID=ParentID,Amount,0))

 

Regards,

Prashant Sangle

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anahita
Contributor II
Contributor II
Author

If I want to show sum(amount) when user select branchld, what should I do?

I’ve tried this but it doesn’t work.

sum({<FactRevenueAmt={“>=$(=branchId)”}>} Amount)

Kushal_Chawda

@Anahita  Can you create a sample data with expected output in excel?

Anahita
Contributor II
Contributor II
Author

Here you are.

  • 329EA48E-4A31-4D9B-8E2A-69E843867B8E.jpeg

  •  
Kushal_Chawda

@Anahita  I don't see InsofficeID and ParentID in your excel data. Also, don't see expected output

Anahita
Contributor II
Contributor II
Author

Instead of these 2 fields I want to use branchId, take, user choose one of the branchId, one of the group name , one or more month, so based on these fields sum(amount) should be displayed