Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi, I have a problem with subtracting two date columns from different tables.
I have tried this. DATEDIFF( SUM( 'Table' [Column] ) , SUM( 'Table' [Column]) , DAY ).
But when i drag this measuer into a table it gives me this message.
" An unvalid numerical representation of a datevalue has occoured"
Could this be because thera are some future date in one column that dosent exist in the other ?
Thanks
Solved! Go to Solution.
I found out the problem... It was just to change SUM to MAX.
Hi @Ronning
If there is a relationship between th etwo tables then if table1 is at the many side and table2 is at the one side and assuming that 'Table1'[Column] is the earlier date and 'Table2'[Column] is the later date then you can use
# Days =
SUMX (
'Table1',
DATEDIFF ( 'Table1'[Column], RELATED ( 'Table2'[Column] ), DAY )
)
I found out the problem... It was just to change SUM to MAX.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 19 | |
| 13 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 30 | |
| 26 | |
| 17 | |
| 11 | |
| 10 |