Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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!