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
Anonymous
Not applicable

Calculation Error in measure while calculating values for Sum of entire date data and single value

Hi All, 

 

I am new to power bi and I am trying to build a report which has two datasets involved.  data sets are mentioned below. 

1. Long_Term_Data: this data consists of multiple columns for the same date which I need to sum up. 

2. Excel sheet: where I have projected data for the day (Single entry against each date). 

 

I am trying to create a difference between the sum of Long_term_data - Projected data for each date. 

 

Here is the DAX function I tried but it is returning an error: 

 

Column2 minus ALL =
CALCULATE(VALUES('Sheet1'[Column2]) - SUM('MLP_PREDICTION_LONG_TERM'[ALL]))
 
Below is my table and relationships 
 
Long_Term_Data table 
Sam2112_0-1635013492726.png

 

Projected table 

Sam2112_1-1635013555341.png

 

I have Relationship between those tables as below. 

 

Long_Term: Projected data ----> PDate ---->Date  Many to one 

 

Any help is really appreciated 

1 REPLY 1
VahidDM
Super User
Super User

Hi @Anonymous 

 

Understand you want to calculate the difference for each date, so you used the Date in the visual.

try this:

Column2 minus ALL =
MAX('Sheet1'[Column2]) - SUM('MLP_PREDICTION_LONG_TERM'[ALL])
 

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.