Forum Discussion
Help with data Modeling for a table with multiple dates
- 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.
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.
- atjt2175 years agoHelper III
Thank you! i think this is the best solution for it. I appreciate your help!