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
leo8nardo8
New Member

Projecting future sales and revenue

Hello,
I'm struggling in how to make some analysis in Power Bi.
I'm comfortable in manipulate and represent with Power Bi, but I'm kinda newbie in more complex DAX solutions.

So, my goal is to analyse future payments and project future sales/payments coming from renovations.
Examples bellow.

  • Client 1 have buyed offer AA2 from product A at 20/11
    • I will receive in 12 installments (col Payment received)
    • And in 365D (Renovation) they will charged again with the Renovation price
  • Client 2 have buyed offer BB2 from product B at 22/11
    • I will receive in 30D (Payment received)
    • And in 30D (Renovation) they will charged again with the Renovation price
      • This will occur several time along the year

Some examples of the data:

Products

ProductOfferInitial priceRenovation (days)Renovation price
AAA17501801000
AAA215003652000
BBB1103030
BBB2509090
BBB3100180180

Buyers

NameOfferPurchase datePayment received
Client 1AA220/11/202012x Installments Credit Card
Client 1BB121/11/202030D
Client 2BB222/11/202030D
Client 3BB323/11/202030D

 

So I want to calculate the revenue over all 2021 from payments and projected sales renovations by products.
But atm I don't have ideas on how to start this at Power Bi in a practical way.
ideas?

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

Hi @leo8nardo8 

Based on your description, you can do some steps as follows.

 

  1. Create a ‘End Date’ column.

 

End date =

var x1=SWITCH('Buyers'[Payment received],"12x Installments Credit Card",365,"30D",30)

var x2=IF(x1>RELATED(Products[Renovation (days)]),x1,RELATED(Products[Renovation (days)]))

return

[Purchase date]+x2

 

  1. Create two measures.

 

End_date = MAXX(FILTER(ALL(Buyers),[Name]=SELECTEDVALUE(Buyers[Name])),[End date])

Total revenue in 2021 = SUMX(FILTER(ALL('Buyers'),[Name]=SELECTEDVALUE(Buyers[Name])&&YEAR([End date])=2021),RELATED(Products[Initial price])+RELATED(Products[Renovation price]))


Result:

v-yuaj-msft_0-1606697682280.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuaj-msft
Community Support
Community Support

Hi @leo8nardo8 

Based on your description, you can do some steps as follows.

 

  1. Create a ‘End Date’ column.

 

End date =

var x1=SWITCH('Buyers'[Payment received],"12x Installments Credit Card",365,"30D",30)

var x2=IF(x1>RELATED(Products[Renovation (days)]),x1,RELATED(Products[Renovation (days)]))

return

[Purchase date]+x2

 

  1. Create two measures.

 

End_date = MAXX(FILTER(ALL(Buyers),[Name]=SELECTEDVALUE(Buyers[Name])),[End date])

Total revenue in 2021 = SUMX(FILTER(ALL('Buyers'),[Name]=SELECTEDVALUE(Buyers[Name])&&YEAR([End date])=2021),RELATED(Products[Initial price])+RELATED(Products[Renovation price]))


Result:

v-yuaj-msft_0-1606697682280.png

 

Hope that's what you were looking for.

Best Regards,

Yuna

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.