Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

How to get Max of column wrt two Filters?

 

TableNP IDProvider Full NameDrug Market Share NumeratorMarket Share DenominatorExpected Output
PROD130928288Pentakota JagadeeshXamorin5139200.570819266
PROD130928288Pentakota JagadeeshXamorin000.570819266
PROD130928288Pentakota JagadeeshXamorin0900320.570819266
PROD130928288Pentakota JagadeeshXamorin000.570819266
PROD130928288Pentakota JagadeeshXamorin000.570819266
PROD130928288Pentakota JagadeeshRemora001
PROD130928288Pentakota JagadeeshRemora0350611
PROD130928288Pentakota JagadeeshRemora3506101
PROD130928288Pentakota JagadeeshRemora001
PROD130928288Pentakota JagadeeshRemora001
PROD123456788Vinay kumarAftarimin001
PROD123456788Vinay kumarAftarimin0693301
PROD123456788Vinay kumarAftarimin6933001
PROD123456788Vinay kumarAftarimin001
PROD123456788Vinay kumarAftarimin001
PROD123456788Vinay kumarAftarimin001
Channel190308883Santosh babuDolo65004
Channel190308883Santosh babuDolo6510004
Channel190308883Santosh babuDolo650254

 

 

Above is my Data Model and i was looking for the Dax Query to get my output as Column called "Expected Output" in the Above Table.

 

The output should be Max of (Market Share Numerator)/ Max(Market Share Denominator) wrt Drug for PROD Table

NPI ID is Unique for every provider 

1 REPLY 1
rfigtree
Resolver III
Resolver III

=CALCULATE(
	DIVIDE(MAX(Table1[Market Share Numerator]),MAX(Table1[Market Share Denominator])),
	ALLEXCEPT(Table1,Table1[NP ID],Table1[Drug]))

 

rfigtree_0-1613714362516.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.