Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a table with two dimensions; Ticket_id and Question_id, and a value; Rating. I want to, in set analysis, sum the Rating. The problem I have is that there can be multiple rows with the same Ticket_id, Question_id and Rating, but I only want to sum Rating for distinct Ticket_id and Type. This is because every row has a different timestamp and each row is counted as a separate support issue.
Table
So for the above example the results should be a sum of 14 and a count of 4.
I have tried with the Aggr() function (and it gives me the correct result) but since I need to be able to select a date period and it changes the sum depending on what dates I choose I can't use that. The data is presented in a table with Date as the main dimension shown in weeks/months.
For the count I'm using the following which works, is there a way to do this for sum?
count({<Question_id-={''},Rating-={''}>}distinct Ticket_id & Question_id)
Sum(Aggr(Sum(DISTINCT{<IDs={"=Count({<Question_id-={''},Rating-={''}>}DISTINCT Ticket_id & Question_id)>0"}>} Rating), Date , Question_id, Ticket_id))