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

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

Reply
jd8766
Helper II
Helper II

Calculate measure against unrelated date table?

Hello, does anyone know if the below is possible?

I have 2 tables like the below, the one on the left is my payment table and the one on the right is my forecast table. Both are related to their own DIM.Date tables..

jd8766_0-1647619480397.png
I have a visual at the moment that shows a line graph for the forecasted amount..

jd8766_1-1647619580343.png



However I want to add a separate line showing the amount from the payments table so I can see the performance of actual payments vs what we forecasted, 

Is there a way I can do this via a measure? Appreciate your help as always..

 

6 REPLIES 6
PaulDBrown
Community Champion
Community Champion

Try:

Payment = CALCULATE(SUM(Payment[Amount]), TREATAS(VALUES(Dim Forecast Date [Date]), Payment [Date]))

If in the visual you are using the date field from the forecast table directly, adjust the VALUES expression accordingly.

Out of curiosity, why do't you have a single date table? 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






mh2587
Super User
Super User

 measure = sum(tableName(Amout))


Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



I tried this.. it doesn't work as the 2 tables aren't related

Then try this

measure = 

CALCULATE(
    sum(tableName(Amout)),
    TREATAS(VALUES(Table1[PaymentID]),Table2[PaymentID]))

Did I answer your question? If so, please mark my post as a solution!


Proud to be a Super User!




LinkedIn Icon
Muhammad Hasnain



Hmm... still doesn't seem to work. I think it needs to be anchored on both the paymentid and the date.. so that the amount from table 1 on the 1-feb-2022 can be seen against the same date in the 2nd table.. if that makes sense. I just can't get my head around the best way of doing this.

m3tr01d
Continued Contributor
Continued Contributor

hi @jd8766 ,

on your chart, are you using the date from DimDate or from of the two tables?
You should be using the field from the dimension.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors