Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have following table:
Serialnumber | Status |
1111 | B |
1111 | M |
2222 | B |
2222 | M |
3333 | B |
3333 | M |
5432 | B |
1234 | B |
I want to count the serialnumbers with status 'B' . Only in case the serialnumber already exist with status 'M' it should be deducted from the first count.
like that: count({$<Status={B}>}serialnumber)- count({$<Status={M}, (serialnumber of B= seralnumber of M>}serialnumber)
Is that better solve with If-Statement? can you give me example in if and in set analysis please.
I hope I explained my problem well.
Thank you in advance.
sorry @Taoufiq_Zarra about the format of the additional columns.
But it the website didn't accept my formatted table from excel .
and no... in qliksense I left the identifier in the fuction, so it cannot be changed through selections. I aware of that. no filter was on anyway.
@Applicable88 if its the same logic you need:
=sum({<Status={'B'},Serialnumber={"= count({<Status={'M'}>} Status)>0"}>} Value)
and
=sum({<Status={'B'},Serialnumber={"= count({<Status={'M'}>} Status)>0"}>} Value)
if not can you share also the expected output from the attached sample ?