Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
HI ,
i wanna count distinct of customers who purchased>2 , but above calculation doesn't work ,it show 7 which is count all Customers . it is not right. the right number is only 2 Customers who Re-Purchased.
PS :
Purchased Customer >0
Repurchased Customer >2
how to acheive this ?
Solved! Go to Solution.
Hi @Chanleakna123 ,
You may create measures like DAX below.
Count purchase= = CALCULATE(SUM('Fuze and Energy'[Purchased]),FILTER(ALLSELECTED('Fuze and Energy'), 'Fuze and Energy'[Customer Name - Store[Customer]] =MAX('Fuze and Energy'[Customer Name - Store[Customer]])))
Repurchased count= CALCULATE(DISTINCTCOUNT('Fuze and Energy'[Customer Name - Store[Customer]]),FILTER(ALLSELECTED('Fuze and Energy'), [Count purchase]>2))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@v-xicai , hi , now i have a condition , if the customers purchased at the same date for 2 times , we count only Purchased ,
but the calculation is turning to Re-Purchased as well which is wrong , while we need to count only Purchase Customer, But take out Re-Purchased
Hi @Chanleakna123 ,
You may create measures like DAX below.
Count purchase= = CALCULATE(SUM('Fuze and Energy'[Purchased]),FILTER(ALLSELECTED('Fuze and Energy'), 'Fuze and Energy'[Customer Name - Store[Customer]] =MAX('Fuze and Energy'[Customer Name - Store[Customer]])))
Repurchased count= CALCULATE(DISTINCTCOUNT('Fuze and Energy'[Customer Name - Store[Customer]]),FILTER(ALLSELECTED('Fuze and Energy'), [Count purchase]>2))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In case the solution does not work out. Refer to the similar solution on
@v-xicai , hi , now i have a condition , if the customers purchased at the same date for 2 times , we count only Purchased ,
but the calculation is turning to Re-Purchased as well which is wrong , while we need to count only Purchase Customer, But take out Re-Purchased
Try below measure:
Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!
hi , i don't know what happen ,
but below is my purchased customers , is this related together ?
Did you try my solution? I have also posted screen shot of your expected answer.
Please don't forget to hit THUMBS UP and Accept this as a solution if it helps you!
hi , let's do it this way ,
looks at the metrix table below , if the customers keep purchasing >= 2 times based on selected period , they consider as Re-Purchased Outlets , The Outlet count is Distinct Count .
as below cased , it count 2 outlets as Re-Purchased Outlets
Try something like this
No of purchase =
CALCULATE(DISTINCTCOUNT('Table'[purchase]))
No of clients = COUNTX(filter(values('Table'[Client]),[No of purchase]>=2), [No of purchase])
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
https://community.powerbi.com/t5/Community-Blog/Winner-Topper-on-Map-How-to-Color-States-on-a-Map-wi...
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
https://community.powerbi.com/t5/Community-Blog/Power-BI-Working-with-Non-Standard-Time-Periods/ba-p...
https://community.powerbi.com/t5/Community-Blog/Comparing-Data-Across-Date-Ranges/ba-p/823601
Hm. No the filters affect the measure to show only the results from what you have filtered.
Can you post the DAX-code from your measure?
//J
Hi @Chanleakna123,
I would use the COUTNROWS() function together with FILTER(). FILTER creates a filtered table with the critera to only show rows >= 2 and COUNTRORWS simply counts them.
In your case something like: Measure = COUTNROWS(FILTER(Customers;Purchased >=2))
try a measure
Measure =
CALCULATE (DISTINCTCOUNT('Fuze and Energy'),SUM('Fuze and Energy'[Purchased])>2)
do not hesitate to give a kudo to useful posts and mark solutions as solution
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
102 | |
84 | |
79 | |
68 |
User | Count |
---|---|
120 | |
110 | |
94 | |
81 | |
77 |