Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Sign up nowGet Fabric certified for FREE! Don't miss your chance! Learn more
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 | TextedDate | TextsSentBy | TextSuccess |
| OR-210103001 | 1/3/2021 | A0040 | 1/3/2021 | B3722 | 1/3/2021 | B3722 | TRUE |
| OR-210103001 | 1/3/2021 | A0040 | 1/3/2021 | A0040 | 1/3/2021 | A0040 | FALSE |
| OR-210104105 | 1/4/2021 | B3722 | 1/4/2021 | B3722 | 1/4/2021 | C6347 | FALSE |
| OR-210104001 | 1/4/2021 | C6347 | 1/4/2021 | C6347 | 1/4/2021 | B3722 | TRUE |
| OR-210105001 | 1/5/2021 | A0040 | 1/5/2021 | A0040 | 1/5/2021 | A0040 | FALSE |
| OR-210106001 | 1/6/2021 | A0040 | 1/6/2021 | A0040 | 1/6/2021 | A0040 | TRUE |
| OR-210106002 | 1/6/2021 | B3722 | 1/6/2021 | A0040 | 1/6/2021 | B3722 | TRUE |
| OR-210105113 | 1/5/2021 | A0040 | 1/5/2021 | C6347 | 1/5/2021 | A0040 | TRUE |
| OR-210105116 | 1/5/2021 | B3722 | 1/5/2021 | A0040 | 1/5/2021 | C6347 | TRUE |
| OR-210107044 | 1/7/2021 | C6347 | 1/7/2021 | A0040 | 1/7/2021 | A0040 | FALSE |
| OR-210105062 | 1/5/2021 | C6347 | 1/5/2021 | C6347 | 1/5/2021 | B3722 | FALSE |
| OR-210106906 | 1/6/2021 | C6347 | 1/6/2021 | B3722 | 1/6/2021 | A0040 | TRUE |
| OR-210107100 | 1/7/2021 | B3722 | 1/7/2021 | C6347 | 1/7/2021 | C6347 | TRUE |
| OR-210107020 | 1/7/2021 | C6347 | 1/7/2021 | B3722 | 1/7/2021 | B3722 | FALSE |
| OR-210106068 | 1/6/2021 | C6347 | 1/6/2021 | A0040 | 1/6/2021 | C6347 | TRUE |
| OR-210105169 | 1/5/2021 | B3722 | 1/6/2021 | A0040 | 1/5/2021 | A0040 | TRUE |
User Id: (Note: on the order details table the User Id is also used on Assignedby and Texted by)
| UserID | AgentName |
| A0040 | Agent A |
| B3722 | Agent B |
| C6347 | Agent C |
What im trying to do is figure out the number the following:
For example:
On 1/13/2021 for Created Date, Asigned Date and Texted Date:
| AgentName | CreatedDate | AssignedDate | TextedDate | TextSuccess |
| Agent A | 2 | 1 | 1 | 0 |
| Agent B | 0 | 1 | 1 | 1 |
| Agent C | 0 | 0 | 0 | 0 |
How do i create a relationship for these 2 tables and what formula should i use to get a count?
Solved! Go to Solution.
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.
Thank you! i think this is the best solution for it. I appreciate your help!
Hi,
Please explain how you arrived at the results in last table.
Hi Ashish,
That is what im trying to achieve i don't have a solution for it i manually counted the last table on excel. I want to know what is possible with Power BI or anything close to that even if they are not on the same table. As long as i can get a count of what each Agent created, assigned and texted.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 63 | |
| 62 | |
| 42 | |
| 19 | |
| 16 |
| User | Count |
|---|---|
| 118 | |
| 106 | |
| 38 | |
| 28 | |
| 27 |