Forum Discussion
How to join properly
- 6 years ago
PBI5851 you should create a relationship between date table and table b, it will be inactive relationship and create a measure with the following expression.
Customer Count = CALCULATE ( COUNTROWS ( CustomerTable ) , USERELATIONSHIP ( CustomerTable[CustomerActionDate], DateTable[Date] ) )I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop shop for Power BI related projects/training/consultancy.⚡
- Anonymous6 years ago
Try remove the "Table A to B is 1-many" relationship and make both Tables relate with Date Table via the date columns.
Date Table =>Table A (1- many)
Date Table =>Table B (1-many)
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PBI5851 , it is a direct query or live mode? If it import mode create a date table join with date in both tables. Also, make dates in table do not have a timestamp. else create a new date only column.
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.