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
Topographical
Frequent Visitor

Calculating values at specific levels/points in the report?

I have data that I've laid out by date, then by unique number, and at those points of the report, I need to perform a certain calculation based on items associated with that unique number.

 

I'd then need to aggregate values at those specific points of the report.

 

What would be the best way of going about this?

 

I created a sample file to show what I mean, but can't seem to upload the file.

 

So I basically want to calculate at this point, for every one of these points:

Capture.PNG

That is the view, drilled down through the dates and into the uniques

1 ACCEPTED SOLUTION

Hi,

 

Try this calculated column formula

 

=CALCULATE(SUM([Amounts]),FILTER(Data,[Date]=EARLIER([Date])),Data[Items]="x")-CALCULATE(SUM([Amounts]),FILTER(Data,[Date]=EARLIER([Date])),Data[Items]="y")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @Topographical,

 

What type of calculation you wan to do based on your explanation this is can be achieve with a measure in DAX however without further explanations I'm unable to help better.

 

Can you provide a sample of your data, explanation of calcutation to be made and expected result.

 

thank you

 

Regards,

Mfelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



 

Hi there,

 

Here is the sample data I prepared that feeds into the screenshot I used above.

 

2.PNG

 

So basically the calculation that I need at the point that I showed above would be based on the "items", so let's say for this simple example that the calculation would need to be the sum of x - the sum of y, for each unique, for each month, basically. 

 

Thank you!

Hi there,

 

I am expecting x -y for each unique for each month (ie not row by row, but just for those points), and then I'd like to aggregate those values. 

Hi,

 

Try this calculated column formula

 

=CALCULATE(SUM([Amounts]),FILTER(Data,[Date]=EARLIER([Date])),Data[Items]="x")-CALCULATE(SUM([Amounts]),FILTER(Data,[Date]=EARLIER([Date])),Data[Items]="y")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you for this! I will give it a try.

Hi,

 

What result are you expecting in column E.  Please show those numbers.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.