Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
One shop can sell many day, I wanted to count only the first day of unique shop first day sold.
Here is my data
Sales Date | Shop |
2-May-19 | A |
2-May-19 | B |
2-May-19 | A |
3-May-19 | A |
4-May-19 | B |
5-May-19 | C |
Expected Result:
Sales Date | Count(distinct Shop) |
2-May-19 | 2 |
5-May-19 | 1 |
I want to write expression in the Qlik Sense application that could count just the first record by day. Selection of month and year can varie.
What I acutally want is , once the record sold on 1st day, then will count as 1, if the same shop sold the next day or any other day, shouldn't count.
May be this
Sum(Aggr(If(Shop <> Above(Shop), 1, 0), Shop, ([Sales Date], (NUMERIC))))
try this?
count(distinct "Sales Date")
What I acutally want is , once the record sold on 1st day, then will count as 1, if the same shop sold the next day , shouldn't count.
try this?
aggr(if(count(Shop)=1,Shop),Shop)
Why do you have a count of 1 on 3rd May? Shop A already sold on 2nd May....
I tried aggr(if(count({"Sales Date"=}Shop)=1,Shop),Shop) it doesn't work.
Your formula didn't work.
One shop can sell many day, I wanted to count only the first day of unique shop first day sold.
Sorry my bad, I edited the result. 3rd May shouldn't be counted.