I have a Anti Virus scan dataset which gets generated on daily basis and goes many days back in the past, in this i have to calculate number of times a machine is appearing a Non-Compliant in last 5 days, Currently I am using below DAX formula to create calculated column
Repetition = CALCULATE(COUNT('SCCM Antivirus'[MachineName]),ALLEXCEPT('SCCM Antivirus','SCCM
Antivirus'[MachineName]),'SCCM Antivirus'[ComplianceStatus]= "Non-
Compliant",'SCCM Antivirus'[HRs]<= 120)
But, The problem is that every machine has multiple appids hence instead of calculating 1 count per day per machine, which should be maximum 5 for 5 last days, i get count(appid),
e.g. in the attached table, if i want to see how many times Machine 'A' has repeated in last two days 11/03 and 10/03 then it should give me a count of 2, and that is what my requirement is also, but instead i get count of 5, as Machine A has 2 Appid on 11/03 and 3 Appid on 10/03, and this is my problem, i Want distinct count of machine group by date for last 5 days only. Could some please help me.
DISTINCTCOUNT('SCCM Antivirus_RBF'[Date])
in stead ofCOUNT('SCCM Antivirus_RBF'[MachineName])
– Marco Vos