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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
GQinBURQUE
Regular Visitor

Subtracting a curve

Hi,

 

I am guessin this is a simple task, but have yet to get it working.  I have a measure, and the total of the measure is -8.08, and iI'd like to subtract that value from each row within a table.  Baiscally, I have two dynamic columns, and the difference of the averages of each needs to be subtracted form each of the values that were part of the calculated average.  I hiope the below will draw a clearer picture.  At the end, i need to be able to subtract the difference of two dyanamic averages of two different columns in two different tables, from the original individual values of one of the columns, whcih in essence will create a new column.  Essentially i need to create a curve.

 

name1num 1Num - Value = XName 20num 1 bNum - Value = X
name2num 2Num - Value = XName 21num 2 BNum - Value = X
name3num 3Num - Value = XName 22num 3 BNum - Value = X
name4num 4Num - Value = XName 23num  4 BNum - Value = X
name5num 5Num - Value = XName 24num 5 BNum - Value = X
name6num 6Num - Value = XName 25num 6 BNum - Value = X
name7num 7Num - Value = XName 26num 7 BNum - Value = X
name8num 8Num - Value = XName 27num 8 BNum - Value = X
name9num 9Num - Value = XName 28num 9 BNum - Value = X
name10num 10Num - Value = XName 29num 10 BNum - Value = X
name11num 11Num - Value = XName 30num 11 BNum - Value = X
AverageAverage of Num AverageAverage of Num B 
      
Value = Average of Num - Average of Num B     
1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Soooo...the issue I see with this is that your row context is going to be enforced on your measure. In other words, your measure will be calculated within the row context. So, you will need to wrap your measure in your column calculation in a CALCULATE with an ALL or ALLEXCEPT filter most likely. Basically, you need to implicitely specify the same filter context where you get your -8.08 value.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Soooo...the issue I see with this is that your row context is going to be enforced on your measure. In other words, your measure will be calculated within the row context. So, you will need to wrap your measure in your column calculation in a CALCULATE with an ALL or ALLEXCEPT filter most likely. Basically, you need to implicitely specify the same filter context where you get your -8.08 value.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thank You.  I was able to get it completed.   Nice work!!

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.

Top Solution Authors