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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Super User
Super User

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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Super User
Super User

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.


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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