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
ONBjoaoribeiro
Regular Visitor

Add Number of Sales to Customer Summary Table

Good afternoon,

 

I am trying to count the number of times a Customer has been serviced during a specific year, but somehow I cannot find the solution. I really hope you can help me out.

 

This is the info I have in Power BI Desktop Tables

Table One: Contains all the business data (Columns are: Customer Name, Year Service Provided, Amount Billed)

Table Two: Contains the list of alll customers and its type  (Columns are: Customer Name, Customer Type)

 

I want to add to Table Two a column that counts the times the Customer has been serviced during 2021. (This data is available in table one).

 

I know this must be easy to accomplish and I looked everywhere for an answer, but I just can't find it. 

 

Thank you very much in advance,

 

Joao

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @ONBjoaoribeiro ,

 

Check the formula.

Column = CALCULATE(COUNT('Table'[Customer]),FILTER('Table','Table'[year]=2020&&'Table'[Customer]='Table (2)'[Customer]))

4.PNG

5.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @ONBjoaoribeiro ,

 

Check the formula.

Column = CALCULATE(COUNT('Table'[Customer]),FILTER('Table','Table'[year]=2020&&'Table'[Customer]='Table (2)'[Customer]))

4.PNG

5.PNG

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Thanks a lot Jay.

 

This worked perfectly. 

ONBjoaoribeiro
Regular Visitor

Hello @Krutigawale33 ,

 

The column count of customer name, you have  on your example, is exactly what I am trying to achieve. I need it as a calculated column on my table. See examples below:

 

I need the column 2020 Rango Embarques to be automatically updated, by looking up the value in column Customer+Country on the table Actual Shipments. The column should count how many rows the lookedup value appears if Ano (Year) = 2020

 

Screenshot 2021-03-15 113257.pngScreenshot 2021-03-15 113410.png

Krutigawale33
Responsive Resident
Responsive Resident

Hello @ONBjoaoribeiro ,

 

I have tried to create what you want by adding some dummy data.

 

Krutigawale33_0-1615720314430.png

let me know if this is what you want. if not then could you able to provide some data to analyze the problem

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.