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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Show amount associated with first sale to each customer

Hi all, I have a table with the following data of customer engagements, i.e. projects that they signed on for:

- customer names

- start dates

- realized revenue

- expected revenue

 

What I would like to display, is a table of all the customers and the realized revenue/expected revenue from their first deal is.

 

A customer may have 2 engagements that both started on the same date, in that case, I'd like to display the sum of both engagements (the realized and expected revenue)

 

Here's a mocked up sample of what my data looks like

 

CustomerStart DateEarned RevenueExpected Revenue
A1/1/20181m 
B2/1/20192m 
A8/1/20192m 
B2/1/20192m 
A1/1/2020 4m
B1/1/20206m 

 

In this case, my expected output would be:

Customer A - 1m

Customer B - 4m (since two engagements started on the earliest day)

1 ACCEPTED SOLUTION
pranit828
Community Champion
Community Champion

Hi @Anonymous 

Considering you have the belwo input data type in data set(I have changed the Earned revenew column to number data type to get the sum)

pranit828_0-1597799826406.png

And use the below measure 

 

calc = 
var MIN_DATE = CALCULATE(MIN('Table'[Start Date]),ALLEXCEPT('Table','Table'[Customer]))
RETURN CALCULATE(SUM('Table'[Earned Revenue]),FILTER(ALLEXCEPT('Table','Table'[Customer]),'Table'[Start Date]=MIN_DATE))

 

 

to get the below desired output as you needed.

pranit828_0-1597799987628.png

 

 

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

View solution in original post

1 REPLY 1
pranit828
Community Champion
Community Champion

Hi @Anonymous 

Considering you have the belwo input data type in data set(I have changed the Earned revenew column to number data type to get the sum)

pranit828_0-1597799826406.png

And use the below measure 

 

calc = 
var MIN_DATE = CALCULATE(MIN('Table'[Start Date]),ALLEXCEPT('Table','Table'[Customer]))
RETURN CALCULATE(SUM('Table'[Earned Revenue]),FILTER(ALLEXCEPT('Table','Table'[Customer]),'Table'[Start Date]=MIN_DATE))

 

 

to get the below desired output as you needed.

pranit828_0-1597799987628.png

 

 

 





PBI_SuperUser_Rank@1x.png


Hope it resolves your issue? 
Did I answer your question? Mark my post as a solution!

Appreciate your Kudos, Press the thumbs up button!!
Linkedin Profile

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.