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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
hbgv123
Frequent Visitor

DAX Measure based on multiple fields

Hi, 

I am trying structure my calculations using DAX and i cannot change my datamodel.

I need to calculate two measures

Rating Measure - this is calculated by considering sum of above/ sum of under from format column when setting is Rating

Target Measure- this is calculated by considering sum of above/ sum of under from format column when setting is Target

I achieved this calculation in powerquery but i wanted to use DAX for other reasons.

Can you help in providing tips to achieve these measures?

 

DateProductFormatSettingValue
Jan-23LuxAboveRating20
Jan-23LuxUnderRating30
Jan-23LuxAboveTarget30
Jan-23LuxUnderTarget40
Feb-23LuxAboveRating30
Feb-23LuxUnderRating40
Feb-23LuxAboveTarget40
Feb-23LuxUnderTarget50
Mar-23LuxAboveRating45
Mar-23LuxUnderRating45
Mar-23LuxAboveTarget40
Mar-23LuxUnderTarget50

 

 

Expected solution for rating and target measure:

hbgv123_0-1693981616455.png

 

 

Thanks for your help

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

Rating Measure=DIVIDE(CALCULATE(SUM(Data[Value]),Data[Format]="Rating",Data[Setting]="Above"),CALCULATE(SUM(Data[Value]),Data[Format]="Rating",Data[Setting]="Under"))

Target Measure=DIVIDE(CALCULATE(SUM(Data[Value]),Data[Format]="Target",Data[Setting]="Above"),CALCULATE(SUM(Data[Value]),Data[Format]="Target",Data[Setting]="Under"))

View solution in original post

1 REPLY 1
wdx223_Daniel
Super User
Super User

Rating Measure=DIVIDE(CALCULATE(SUM(Data[Value]),Data[Format]="Rating",Data[Setting]="Above"),CALCULATE(SUM(Data[Value]),Data[Format]="Rating",Data[Setting]="Under"))

Target Measure=DIVIDE(CALCULATE(SUM(Data[Value]),Data[Format]="Target",Data[Setting]="Above"),CALCULATE(SUM(Data[Value]),Data[Format]="Target",Data[Setting]="Under"))

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.