Forum Discussion
atjt217
5 years agoHelper III
Help with data Modeling for a table with multiple dates
Hello PBI wizards, Please help me out. I have 2 tables that contains the Order details and the User ID: Order details table: OrderNumber CreatedDate UserId AssignedDate AssignedBy Texte...
- 5 years ago
Hi, atjt217
The relationship is more complicated. If you just want this result, it is not recommended to establish a relationship.
You can create a date table that you want to query the time period, and create four measures to calculate your desired result.
Like this:
Table = CALENDAR(DATE(2021,1,1),DATE(2021,1,10))Measure1 = CALCULATE ( COUNTROWS ( 'Order' ), FILTER ( ALL ( 'Order' ), [CreatedDate] = SELECTEDVALUE ( 'Table'[Date] ) && [UserId] = SELECTEDVALUE ( User[UserID] ) ) ) + 0Here is my sample .pbix file.Hope it helps.
If it doesn’t solve your problem, please feel free to ask me.
Best Regards
Janey Guo
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
5 years agoSuper User
Hi,
Please explain how you arrived at the results in last table.