SUM in conjunction with boolean filter

Options
PaulWestonVA
PaulWestonVA Member, ALL USERS, Partner, Certified Model Builder Posts: 5 Occasional Contributor

I have 2 modules: Data Module and Dashboard module.

1. Data Module has:

     Region (List Item)   Product (Line Item with List Items called PRODS)   Value (Line Item)   Export? (Line Item - Boolean)
e.g    North America   PRODS=Mountain Bike                                                  100                      True

         Europe              PRODS=Mountain Bike                                                    50                       False

 

I would like the Dashboard module to have:-

    Region (List Item)   PRODS (List Item)     Export Value(Line Item)  Local Value(Line Item)

    North America          Mountain Bike             100                                         0

    Europe                     Mountain Bike                 0                                        50

 

So I need in the Dashboard module something like these:-
Export Value = 'Data Module'.Value [SUM: 'Data Module'.Product where 'Data Module'.Export?=True
Local Value = 'Data Module'.Value [SUM: 'Data Module'.Product where 'Data Module'.Export?=False]


How do I use that Boolean as a  with SUM?

Many thanks

Comments

  • PaulWestonVA
    PaulWestonVA Member, ALL USERS, Partner, Certified Model Builder Posts: 5 Occasional Contributor

    @JaredDolich  and @kavinkumar 

     

    Many thanks for your responses however I have not explained the subtlety of the Products in my query. In the data module the Product has a number format of list item and the list is PRODS

    PaulWestonVA_1-1580638880910.png      

    PaulWestonVA_2-1580639300369.png

     

    However in the Dashboard module PRODS is the list item dimension

    PaulWestonVA_3-1580639405247.png

    and I need to be able to get the correct answers. 

    PaulWestonVA_4-1580639540863.png

     

     

  • PaulWestonVA
    PaulWestonVA Member, ALL USERS, Partner, Certified Model Builder Posts: 5 Occasional Contributor

    @JaredDolich Many thanks for a detailed explanation. Please accept my apologies for the delay in sending thanks. This is helpful