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.
Hello,
this might be the stupidest question, but I need to recreate a maxif logic from excel showing the produt, that had the highest revenue within a deal.
Here is an example dataset in excel, that is identical in form to what I have in Power BI
In excel I would add a column showing the highest revenue for each deal
And then check if the revenue for the given row is equal to the maximum for the dea. If yes, that product has the highest and is marked, if not, I leave it empty.
Is there a way to recreate this in power BI with the intial dataset? I would need the exact same result.
Thank you for any help!
Solved! Go to Solution.
Hi @bundipapa
You can do the MAXIF like this
Maxif = CALCULATE(MAX('DataTable'[Revenue]), FILTER(ALL('DataTable'), 'DataTable'[Deal] = SELECTEDVALUE('DataTable'[Deal])))
and the Highest Product column like this
Highest Product Within Deal = IF([Maxif] = SELECTEDVALUE('DataTable'[Revenue]), "Y")
Regards
Phil
Proud to be a Super User!
Hi @bundipapa
You can do the MAXIF like this
Maxif = CALCULATE(MAX('DataTable'[Revenue]), FILTER(ALL('DataTable'), 'DataTable'[Deal] = SELECTEDVALUE('DataTable'[Deal])))
and the Highest Product column like this
Highest Product Within Deal = IF([Maxif] = SELECTEDVALUE('DataTable'[Revenue]), "Y")
Regards
Phil
Proud to be a Super User!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |