0

Is it possible to filter data based on values in two columns matching in Einstein Analytics? For example, I have one column named BO Qty and another named Supply Qty. If BO Qty is 1 and Supply Qty is 1 then I only want to show that row in my result.

If this is not possible I was thinking of another solution which would be to create a formula field that calculates one minus the other, and if the value = 0 then it is a match. I was trying to use this new formula column in the SAQL query but seem to also be running into some difficulty. Below is the query that I am trying to run.

q = load "FillRatio201902"; q = filter q by 'Allocated_Date' == "1/1/66"; q = filter q by 'BO_Qty' > 0; s = filter s by 'Formula1' == 0; result = group q by 'Allocated_Date'; result = foreach result generate q.'Allocated_Date' as 'Allocated_Date', count(q) as 'A', sum(q.'BO_Qty') as 'B', sum(q.'Supply_Qty') as 'C'; result = foreach result generate 'Allocated_Date', 'A', 'B', 'C', B - C as 'D'; result = order result by ('Allocated_Date' asc); result = limit result 2000;

3
  • Maybe add a few more details, but I think what you want is SELECT Field1__c, Field2__c FROM MyObject__c WHERE Field1__c = 1 AND Field2__c = 1 Mar 24, 2019 at 8:35
  • 1
    Just added more details. I forgot to mention that this is in Analytics and using SAQL.
    – NevSter79
    Mar 24, 2019 at 8:38
  • I don't think this will work. This will only match if a cell in each column contains the number 1 in it. I need a solution that will filter the data if cells from both columns match regardless of the number.
    – NevSter79
    Apr 11, 2019 at 9:50

0

You must log in to answer this question.

Browse other questions tagged .