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
Jolcyna
Frequent Visitor

Formula "recommending" the best option based on the criteria

Dear Experts,

I hope you can help / share your perspective on the following problem I am trying to crack in PBI.

I am thinking about “building” a formula that would help would suggest the solution depending on the criteria. Sth like “Solver” in excel but simpler.

 

Let’s assume we have a target revenue (47,000) we need to achieve each year. In order to do that we need to make sure that there’s no gap in revenues (11,000). It means we need to sign contract with new clients. We have a list of potential clients with potential revenues and the potential length of contract for each (‘Client Table).

Problem: We need to fill in “revenues gap” signing the smaller  (i.e. max 4 clients) number of new contracts to fill in gap to the closes possible value – but +/- 10% the gap. Of course, the number of combinations in a real life huge.  The best client combination is also defined by the length of the potential contract - the longer the better.

So I need the formula that would go row by row, first summarize the revenues of the companies with the longest potential contract length to the moment until it achieves the target (i.e. those with 10y long contracts) and see if it’s possible with signing contract with 4 clients only. If not – switch to those with shorter contract.

Something like this. Do you think it’s feasible? I tried – but failed. Attached the sample data and desired outcome (“Recommended client” = Yes)

THANK YOU SO MUCH FOR READING IT!:-)

Targets:

Annual revenues£36,000
Target£47,000
Gap target£11,000 (+/-10%)

 

Compny namePotentil RevenuesPotential contract lenghtRecommended client
Com1£15,6005 
Com2£1,2345 
Com3£12310Yes
Com4£7,85410Yes
Com5£3475 
Com6£2155 
Com7£7465 
Com8£3,21410Yes

 

Sum of recommended£11,191
Within acceptable rangeYes

 

 

 

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

Hi @Jolcyna ,

 

Here's the possible idea.

Create a what-if parameter to get the range of target.

vstephenmsft_0-1678870819968.png

Create a measure to get the ranking values. Based on this ranking, you can find the maximum revenue for each group by group and compare it to the target range.

vstephenmsft_1-1678872177681.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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-stephen-msft
Community Support
Community Support

Hi @Jolcyna ,

 

Here's the possible idea.

Create a what-if parameter to get the range of target.

vstephenmsft_0-1678870819968.png

Create a measure to get the ranking values. Based on this ranking, you can find the maximum revenue for each group by group and compare it to the target range.

vstephenmsft_1-1678872177681.png

                                                                                                                                                         

Best Regards,

Stephen Tao

 

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.