Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 repetiu em, por exemplo, o
Cod Assinatura "24539774" repetiu 3 vez (janeiro, março e maio)
Cod Assinatura "25879994" repetiu 1 vez (maio)
Cod Assinatura "90988234" repetiu 1 vez (janeiro, fevereiro, março e abril)
2 – Se a quantidade de vezes que se repetiu foi maior ou igual a 3 é uma assinatura reincidente.
3 – Quantas assinaturas foram reincidentes, no exemplo acima o meu total é igual a 2.
Solved! Go to Solution.
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.
Hi,@sns1996 .Thank you for your reply
You can share .pbix files to the forum by uploading them to OneDrive!
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.
Oi, Carson Jian. Obrigado pelo retorno.
Utilizei as medidas que voce me enviou mais não esta dando certo.
Estou anexando o arquivo que estou trabalhando para verificar onde estou errando.
Desde já agradeço.
Atenciosamente
Sérgio Nogueira
Hi,@sns1996 .Thank you for your reply.
This may be due to the fact that the data I tested and your actual data do not match, and the calculation environment is different so that the code I provided does not achieve the correct effect.
You need to re-edit the code according to the field requirements in your actual case and the relationship before the table.
In my test data, the Data Bancas are Data/Time type data, the rest of the data is numeric or text type, but actually this does not affect the overall calculation logic!
Unfortunately, I can't access the workspace report you provided due to my work environment, can you provide the pbix file that doesn't contain sensitive data (with simple test data in between, such as the case scenario you presented before)
Below is a screenshot when I try to access the link you provided:
Please modify the code I provided according to your actual computing environment, if you can provide the corresponding pbix file (without sensitive data) and some data screenshots, it will be very helpful in solving your problem.
How to Get Your Question Answered Quickly - Microsoft Fabric Community
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.
Bom dia, Carson Jian,
Não estou conseguindo anexo o arquivo pbix, só encontrei a opção de anexar o link.
Você pode me ajudar como anexar.
Atenciosamente,
Sérgio Nogueira
Hi,@sns1996 .Thank you for your reply
You can share .pbix files to the forum by uploading them to OneDrive!
User | Count |
---|---|
17 | |
17 | |
14 | |
13 | |
13 |
User | Count |
---|---|
17 | |
14 | |
13 | |
10 | |
8 |