Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
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.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |