Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table with 3 columns: Product, Cost, Revenue.
There are 1000 rows (1000 distinct Products).
My budget equals B.
I want to filter 3 Products so that I maximize the Revenue sum for those 3 products, provided that the total Cost for those 3 Products are less than my budget B.
Can this be done in Power BI?
I would appreciate any kind of help.
Thank you in advance.
Best Regards.
Such tasks are not suitable for effective DAX calculations (DAX is not a language for optimization problems). What you can do is this. Create a table where you'll have combinations of all 3 products. For each combination you should store their total cost and their total revenue as well Yes, I know, it'll be 1000^3 rows but PBI should be able to handle this, especially that there'll be a lot of repetition in each column (so the compression rate should be high). You can at least try... If you have such a table, it should then be easy to find the combination of interest.
Well, actually it'll not be 1000^3 combinations but only 166 167 000 (1000 over 3). Well, this is something PQ can definitely handle without a problem! 🙂
User | Count |
---|---|
23 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |