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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
eblake
Frequent Visitor

Calculated Measure of values in same column

I have a table that I add a new snapshot of data to monthly. The date the new data is entered is the Snapshot Date column (Screenshot - Forecasted Data Table attached). I would like to calculate the difference in the column 'Recognized + Projected Revenue (CAD)' between Snapshots. For Example: I would like the Difference in 'Recognized + Projected Revenue (CAD)' in 'Snapshot Date' "May 2016" and 'Snapshot Date' "June 2016" for project = "X" at 'Date' = "July 2016".

 

I have also attached a picture of how I have configured my Matrix that is displaying the data.

 

Any help would be very appreciated.

 

 

Forecasted Data Table.PNG                   Matrix Config.PNG

1 ACCEPTED SOLUTION
v-haibl-msft
Microsoft Employee
Microsoft Employee

@eblake

 

You can do it with several slicers and tables as below. We only need to create a column and measure with following DAX formula.

I’ve also upload my .pbix file here for reference.

Date YearMonth = 
FORMAT ( 'Forecasted Data'[Date], "mmmm yyyy" )
Diff = 
CALCULATE (
    SUM ( 'Forecasted Data'[Recognized + Projected Revenue (CAD)] ),
    FILTER (
        'Forecasted Data',
        'Forecasted Data'[Snapshot Date] = MAX ( 'Forecasted Data'[Snapshot Date] )
    )
)
    - CALCULATE (
        SUM ( 'Forecasted Data'[Recognized + Projected Revenue (CAD)] ),
        FILTER (
            'Forecasted Data',
            'Forecasted Data'[Snapshot Date] = MIN ( 'Forecasted Data'[Snapshot Date] )
        )
)

Calculated Measure of values in same column_1.jpg

 

Best Regards,

Herbert

View solution in original post

3 REPLIES 3
v-haibl-msft
Microsoft Employee
Microsoft Employee

@eblake

 

You can do it with several slicers and tables as below. We only need to create a column and measure with following DAX formula.

I’ve also upload my .pbix file here for reference.

Date YearMonth = 
FORMAT ( 'Forecasted Data'[Date], "mmmm yyyy" )
Diff = 
CALCULATE (
    SUM ( 'Forecasted Data'[Recognized + Projected Revenue (CAD)] ),
    FILTER (
        'Forecasted Data',
        'Forecasted Data'[Snapshot Date] = MAX ( 'Forecasted Data'[Snapshot Date] )
    )
)
    - CALCULATE (
        SUM ( 'Forecasted Data'[Recognized + Projected Revenue (CAD)] ),
        FILTER (
            'Forecasted Data',
            'Forecasted Data'[Snapshot Date] = MIN ( 'Forecasted Data'[Snapshot Date] )
        )
)

Calculated Measure of values in same column_1.jpg

 

Best Regards,

Herbert

Greg_Deckler
Community Champion
Community Champion

Can you provide some sample data and information on expected output that we could use to engineer a solution?



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...

Hello,

I have attached a screenshot of a sample ot put table, I have a matrix formatted like this table, just missing the differnce column. I have also pasted in a sample of the table I am using for the raw data.

Sample Output.PNG

Snapshot DateDateCompanyProjectProject ClientProject Project stageProject Billable ProjectProject Customer Contract TypeProject First booking dateResources - Booked hours with actualsRecognized + Projected Revenue (CAD)Projected cost [primary loaded cost] (CAD)Actual + Projected Margin (CAD)
5/23/20165/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161032650000
5/23/20166/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161123000000
5/23/20167/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/2016953300000
5/23/20168/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161301250000
5/23/20169/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161062500000
5/23/201610/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161253500000
5/23/201611/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161025500000
5/23/201612/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161092340000
5/23/20161/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20162/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20163/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20164/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20165/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20166/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20167/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20168/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20169/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/201610/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/201611/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/201612/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20161/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20162/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20163/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20164/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
5/23/20165/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20165/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161002500000
6/23/20166/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161022550000
6/23/20167/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161052450000
6/23/20168/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161072340000
6/23/20169/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161004500000
6/23/201610/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161025500000
6/23/201611/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161056500000
6/23/201612/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161072340000
6/23/20161/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20162/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20163/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20164/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20165/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20166/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20167/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20168/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20169/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/201610/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/201611/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/201612/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20161/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20162/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20163/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20164/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
6/23/20165/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20165/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161072600000
7/23/20166/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161102450000
7/23/20167/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/2016982300000
7/23/20168/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/2016100500000
7/23/20169/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161022500000
7/23/201610/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161023500000
7/23/201611/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161056000000
7/23/201612/1/2016Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20161072340000
7/23/20161/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20162/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20163/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20164/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20165/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20166/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20167/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20168/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20169/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/201610/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/201611/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/201612/1/2017Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20161/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20162/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20163/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20164/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000
7/23/20165/1/2018Test CompanyProject AClient AVAActiveBillableFirm Fixed Price12/1/20160000

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.