Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Peter_Sun
Frequent Visitor

Distribution Point Calculated on Power BI

Hi All, 

 

Could anyone help me solve below business scenarions? 

 

Distribution Point Definition: One product sold to one customer with real purchasing value amonnt ( we might send customer samples for free and this of couse won't be calculated as DPs) called One DP. 

 

I need to use a DAX to do this calculation. 

 

I tried to use DISTINCTCOUNT Function, but it could only tell me how many products are sold per month, or how many customers we have per month. I need sort of combing them altogether. 

 

I could do this in Excel using Countif  as below (1) and came out the DPs as (2)

On below tables (3) is customer name and (4) is products purchased by this customer. 

 

DPs.PNG

 

We might want to know how many DPs we are having per month or per quarter. 

 

Really Appreciate if anyone could solve me this puzzle. 

 

Thanks,

Peter Sun 

2 REPLIES 2
Greg_Deckler
Super User
Super User

If you can post some sample raw data I can be more specific. Otherwise, the general replacement for COUNTIF in DAX is CALCULATE like so:

 

Measure = CALCULATE(COUNT([Column]),FILTER(Table,[Column/Measure] > 0))

Something along those lines.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks for your quick reply 

 

And please see below raw data and it is quite falt comparing with pivot table. 

If only used below calculated measure, it would only get the how many products are sold, right?

 

Can you please help me? Thanks 

 

 DP Raw Data.PNG

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.