Forum Discussion
Time Intelligence
- 9 years ago
You are probably closer than you realize, so I will just throw this out there.
Thinking about the dates as numbers it might help...
If you have a value of '1 January 2017' in the DimDate table, it is represented as the number 42736. But if you have a value of '1 January 2017, 13:46' in the CloseDate field, it is represented as 42736.57 (you can check this in Excel by entering these values, then formatting the cell as a number).
If you have a relationship between these two fields, Power BI thinks that the values above do not match. That makes sense to a computer, because they are different numbers. That's why one column is blank while the other isn't when you add them to a table. But you want Power BI to assume that everything that happened on 1 January 2017 should be linked (regardless of the time it happened on that day).
So you can try this:
1. click on edit queries
2. expand and click on the CloseDate column
3. click the Add column tab
4. Click the Date button and select 'Date Only'
This will add a new column that contains only dates (no times). Use that new date-only field in your measures, etc. and see if that helps.
Could you possibly elaborate on the mismatch in dates?
Look at my response here and the pictures...
http://community.powerbi.com/t5/Desktop/Count-by-Category/m-p/83368#U83368
The example is different but you'll see what happens when you use different dates!
hope this helps.
Good Luck!:smileyhappy:
- bhmiller899 years agoHelper V
Sean ah I see. I made a table including the datekey (dimdate) column and the close date column and one is completely blank where the other isn't.
I'm just not getting it at all, can't seem to figure this stuff out. Thanks for you help, I'm just going to throw in the towel!
- Sean9 years agoCommunity Champion
Okay I understand!
If you decide to revist this at a later time check out this post by MattAllington
http://exceleratorbi.com.au/multiple-relationships-between-tables-in-dax/
He uses an example with Ship Date and Order Date
Good Luck! :smileyhappy:
- MalS9 years agoResolver III
You are probably closer than you realize, so I will just throw this out there.
Thinking about the dates as numbers it might help...
If you have a value of '1 January 2017' in the DimDate table, it is represented as the number 42736. But if you have a value of '1 January 2017, 13:46' in the CloseDate field, it is represented as 42736.57 (you can check this in Excel by entering these values, then formatting the cell as a number).
If you have a relationship between these two fields, Power BI thinks that the values above do not match. That makes sense to a computer, because they are different numbers. That's why one column is blank while the other isn't when you add them to a table. But you want Power BI to assume that everything that happened on 1 January 2017 should be linked (regardless of the time it happened on that day).
So you can try this:
1. click on edit queries
2. expand and click on the CloseDate column
3. click the Add column tab
4. Click the Date button and select 'Date Only'
This will add a new column that contains only dates (no times). Use that new date-only field in your measures, etc. and see if that helps.