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.
hi community,
please if you can help, i want to calculate the number of customers that have more than 2 commandes in a week
that i can display in a matrice by Région as in the Pbix file attached
Solved! Go to Solution.
Hi @Sofinobi ,
I suggest you to try this code as below to create a measure.
Count Customer =
VAR _SUMMAIRZE =
SUMMARIZE (
ALLEXCEPT ( Tableau1, Tableau1[Date] ),
Tableau1[Région],
Tableau1[Customer],
"nbr commande", [nbr commande]
)
RETURN
COUNTAX (
FILTER (
_SUMMAIRZE,
[Région] = MAX ( Tableau1[Région] )
&& [nbr commande] > 2
),
[Customer]
)
Due to your sample only have last week data, so I change the date filter to show last week value.
Also in your sample only have customers whose commandes >=2, I change the filter to show values [nbr commande]>=2 to have a test. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
🤔
Hi @Sofinobi ,
I suggest you to try this code as below to create a measure.
Count Customer =
VAR _SUMMAIRZE =
SUMMARIZE (
ALLEXCEPT ( Tableau1, Tableau1[Date] ),
Tableau1[Région],
Tableau1[Customer],
"nbr commande", [nbr commande]
)
RETURN
COUNTAX (
FILTER (
_SUMMAIRZE,
[Région] = MAX ( Tableau1[Région] )
&& [nbr commande] > 2
),
[Customer]
)
Due to your sample only have last week data, so I change the date filter to show last week value.
Also in your sample only have customers whose commandes >=2, I change the filter to show values [nbr commande]>=2 to have a test. Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
thank you so much for you answer , that works
and sorry to be late, cause i was in an other project;
thank you again
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |