- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Clientes Ativos por Grupo de Clientes
Preciso de uma medida que conte todos os clientes de um grupo se um CNPJ desse grupo atender a regra de cliente ativo. Montei a medida abaixo mas não deu certo.
Estou adicionando também o modelo de dados e a tabela que tenho como resultado hoje. Percebam que apenas alguns cnpj's do grupo ficam com o 1 e preciso que todos fiquem.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Nobeltex_PBI ,
Please try the following formula:
Measure =
var tab =
CALCULATETABLE (
VALUES ( dimCliente[Group] ),
FILTER (
ALL ( dimCliente ),
dimCliente[Group] = MAX ( dimCliente[Group] )
&& [Clientes Ativos] > 0
)
)
return
CALCULATE (
COUNT ( dimCliente[id_cliente] ),
FILTER ( all ( dimCliente ), dimCliente[Group] in tab )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Nobeltex_PBI , what is the logic for the active customers? please share that
refer example
Customer Retention Part 5: LTD Vs Period Retention
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retentio...
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview. ✨
️ November 12th-14th, 2024
Online Event
Register Here
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The logic for finding active customers is correct. What I need is that if a customer in the group meets the logic, all the others, even not meeting it, must count as assets. Did you understand?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Nobeltex_PBI ,
Please try the following formula:
Measure =
var tab =
CALCULATETABLE (
VALUES ( dimCliente[Group] ),
FILTER (
ALL ( dimCliente ),
dimCliente[Group] = MAX ( dimCliente[Group] )
&& [Clientes Ativos] > 0
)
)
return
CALCULATE (
COUNT ( dimCliente[id_cliente] ),
FILTER ( all ( dimCliente ), dimCliente[Group] in tab )
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Helpful resources
Join us at the Microsoft Fabric Community Conference
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Microsoft Fabric Community Conference 2025
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
Subject | Author | Posted | |
---|---|---|---|
09-13-2024 02:32 PM | |||
11-11-2020 11:08 AM | |||
09-30-2024 09:21 AM | |||
11-08-2020 12:27 PM | |||
08-30-2024 11:08 AM |
User | Count |
---|---|
21 | |
18 | |
17 | |
7 | |
5 |
User | Count |
---|---|
32 | |
27 | |
19 | |
13 | |
12 |