Forum Discussion
Power BI Dax Linking data from multiple tables
- 11 months ago
Billable Work (works):
Billable Work = SUM ( 'Track Invoice'[Billable Work] )
Run Time (if direct relationships work):Run Time = SUM ( 'GPS'[Run Time] )
If Foreman doesn’t filter GPS → use TREATAS bridge:Run Time =
CALCULATE (
SUM ( 'GPS'[Run Time] ),
TREATAS ( VALUES ( 'Track Equipment'[Equipment ID] ), 'GPS'[Equipment ID] ),
TREATAS ( VALUES ( 'Track Equipment'[Work Date] ), 'GPS'[Date] )
)
Use the TREATAS version if your runtime doesn’t align with Foreman/Date/Equipment.
Billable Work (works):
Billable Work = SUM ( 'Track Invoice'[Billable Work] )
Run Time (if direct relationships work):
Run Time = SUM ( 'GPS'[Run Time] )
If Foreman doesn’t filter GPS → use TREATAS bridge:
Run Time =
CALCULATE (
SUM ( 'GPS'[Run Time] ),
TREATAS ( VALUES ( 'Track Equipment'[Equipment ID] ), 'GPS'[Equipment ID] ),
TREATAS ( VALUES ( 'Track Equipment'[Work Date] ), 'GPS'[Date] )
)
Use the TREATAS version if your runtime doesn’t align with Foreman/Date/Equipment.
- HYEasterly11 months agoHelper I
Thank you! This worked. I had not used the treat as function before. Do you have any insight on when Treat As is needed versus not? Just curious, as I couldn't figure out why my data didn't flow better.
Giving a sample of data as requested by others, sounds sensible... however, by the time I build a sample set of data... it works the way I want it to... not the way my actual data is working... so your suggestion is greatly appreciated! Better yet... IT WORKED!!THANK YOU!