Forum Discussion

sns1996's avatar
sns1996
Icon for Helper I rankHelper I
2 years ago
Solved

Reincidente

Boa tarde, Estou precisando de uma ajuda no cálculo abaixo: Na base em anexo eu preciso calcular o total de reincidente, conforme regras abaixo: 1 - Calcular quantas vezes o cod assinatura se repe...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,sns1996 . I am glad to help you.
    If you want to get the number of "YES" customers in your case, you can refer to my following test
    Here is my test data:

    I created a couple of measures.

    M_No_complaints_month = 
    CALCULATE(DISTINCTCOUNT('Table'[Month_Num]),FILTER(ALL('Table'),'Table'[Cod Assinatura]=MAX('Table'[Cod Assinatura])))
    verification = IF([M_No_complaints_month]>=3,"Yes","No")
    M_num_of_Yes = 
    CALCULATE(
        DISTINCTCOUNT('Table'[Cod Assinatura]),FILTER(ALL('Table'),[M_No_complaints_month]>=3))
    Total Individual Complaints = 
    CALCULATE(SUM('Table'[No of complaints]),FILTER(ALL('Table'),'Table'[Cod Assinatura]=MAX('Table'[Cod Assinatura])))
    

    Here is the result:

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

    Best Regards,

    Carson Jian,

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi,sns1996 .Thank you for your reply 
    You can share .pbix files to the forum by uploading them to OneDrive!