I have created a Persistent Derived Table (PDT) in Looker, and I have another view that joins with this PDT.
In my Explore, I have a measure in the PDT that checks if sales > 0, and if so, it assigns 1 to opportunities; otherwise, it assigns 0.
Issue
At the row level, this measure works fine. However, the total aggregation does not sum correctly. Instead of summing up all the 1s, the total always shows 1.
Employee | Sales | Opportunities (Expected) | Opportunities (Current) |
---|---|---|---|
John | 500 | 1 | 1 |
Alice | 0 | 0 | 0 |
Bob | 300 | 1 | 1 |
Mark | 700 | 1 | 1 |
Total | 3 | 1 |