I want to show a score card showing ‘Sum of students across all distinct batches’, i.e. 1 + 2 + 2 = 5. The normal sum function gives me 12. I want to sum only for distinct batches, i.e. A → 1, B → 2, C->2.
Is there a way to do this on Looker Dashboard, without having to create a separate pivot/group by table?
The simplest option is to create a field with a window operation, for example a row_number for the Batch field and Student, and for the calculation perform the sum of the Student field when the value of the window operation is 1.
Hi @dsimeonova , I have a similar question. I have blended data between two tables, something like:
TABLE A
PROJECT ID
Budget
Project A
250.000
Project B
500.000
Project C
750.000
TABLE B
PROJECT ID
Partner
Project A
Partner 1
Project A
Partner 2
Project A
Partner 3
Project B
Partner 2
Project B
Partner 3
Project C
Partner 3
With the blended source, I get duplicated budget rows, so that when I visualize a budget indicator, with no filters, it is a lot higher that the correct. I would definitely need a SUM_DISTINCT function. Could you help me?
To confirm with you @g_cavallo , are you using Looker Studio or Looker ?
Because as how you expressed yourself, sounds like the issue that you have is on Looker Studio? Is that correct?
I’m afraid that I don’t have enough experience on Looker Studio to confirm on that topic.
The other question ( as far as I understand) was related to Looker, which has completely different functionalities than Looker Studio (even though they share common name).