Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
zagzebski
Creator
Creator

Getting a value based on relationship between two dimensions

I need to get "Margin" based on the relationship between Salesperson and Customer Name. If the sales person has revenue from a client then I need to associate the margin with that salesperson(s) in an expression - even though the salesperson dimension is not in the margin table (not part of the margin records).

    

DATA:
SalespersonCustomer Name Revenue Margin
AmandaZAP Marketing           280.26 0.00
BrandonZAP Marketing           101.42 0.00
  ZAP Marketing  3.00
Judy7UPS       9,877.75 0.00
  7UPS  15.00
LoraAB Co       1,113.15 0.00
StaceyAB Co           194.47 0.00
  AB Co  37.50
CHART:
SalespersonCustomer Name Margin
AmandaZAP Marketing                3.00
BrandonZAP Marketing                3.00
Judy7UPS             15.00
LoraAB Co             37.50
StaceyAB Co             37.50
1 Solution

Accepted Solutions
Not applicable

Hi,

Can you check if this is what you're looking for

View solution in original post

6 Replies
Not applicable

Hi,

Can you check if this is what you're looking for

sunny_talwar

This can be another way to do this without needing to create another table:

If(Len(Trim(Salesperson)) > 0, Sum(TOTAL <[Customer Name]> Margin))

Capture.PNG

zagzebski
Creator
Creator
Author

Thanks! Looks like the best place to do it is in script. Not possible on front end?

sunny_talwar

Did you look at the solution I offered above

Not applicable

Try Sunny solution for the front end solution

zagzebski
Creator
Creator
Author

Thanks Sunny!