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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
JustinDoh1
Post Prodigy
Post Prodigy

How to select a value using SUMX or row context (to create a Measure)

I am trying to convert this Excel formula into measure.

 

=IF( D4>40, D4-40, 0 )  

 

I know, if I create in Column, it is pretty asimple process.

I am trying to save the disk space by creating a Measure.

 

This is initial approach:

 

Measure =
IF (
      sumx('Table1', Table1'[D4]) > 40,
     sumx('Table1',  Table1'[D4]) - 40,
0
)
 
I thought we could use SUMX as a row context, but I am not sure where I am missing.
 
Thanks for help.
1 ACCEPTED SOLUTION
VahidDM
Super User
Super User

Hi @JustinDoh1 

If you want to apply this to all rows of D4 column, Try this:

 

Measure =
Var _Value = Max(Table1'[D4])
return
If(_Value>40,_Value-40,0)
 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

View solution in original post

1 REPLY 1
VahidDM
Super User
Super User

Hi @JustinDoh1 

If you want to apply this to all rows of D4 column, Try this:

 

Measure =
Var _Value = Max(Table1'[D4])
return
If(_Value>40,_Value-40,0)
 

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

Appreciate your Kudos✌️!!

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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