Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi guys,
I'm kinda new in PBI and need help with this logic.
I did something in M (following a youtube video), but its taking too long to join the tables and it is timing out in the service.
I want to know if you guys have another solution for this problem:
I need to identify if the same ID (Customer + Child) had a Rebook or not. In this case, I'll need to check if the same ID has a "next date".
This is the original data:
Customer Name | Child's Name | Appointment |
AAAAA | XXXXX | 9/8/2022 |
AAAAA | XXXXX | 9/9/2022 |
AAAAA | YYYYY | 10/1/2022 |
AAAAA | YYYYY | 10/5/2022 |
BBBBB | XXXXX | 11/2/2022 |
BBBBB | XXXXX | 11/5/2022 |
BBBBB | XXXXX | 11/7/2022 |
BBBBB | XXXXX | 11/8/2022 |
BBBBB | YYYYY | 12/5/2022 |
This is what I am trying to do - if Next Appointment > Appointment then Rebook else No Rebook.
Customer Name | Child's Name | Appointment | Next Appointment | Result |
AAAAA | XXXXX | 9/8/2022 | 9/9/2022 | Rebook |
AAAAA | XXXXX | 9/9/2022 | NULL | No Rebook |
AAAAA | YYYYY | 10/1/2022 | 10/5/2022 | Rebook |
AAAAA | YYYYY | 10/5/2022 | NULL | No Rebook |
BBBBB | XXXXX | 11/2/2022 | 11/5/2022 | Rebook |
BBBBB | XXXXX | 11/5/2022 | 11/7/2022 | Rebook |
BBBBB | XXXXX | 11/7/2022 | 11/8/2022 | Rebook |
BBBBB | XXXXX | 11/8/2022 | NULL | No Rebook |
BBBBB | YYYYY | 12/5/2022 | NULL | No Rebook |
Could you pleeeeease help me with that? Any ideas?
Solved! Go to Solution.
Hi,
2 calculated columns:
Next Appointment :=
CALCULATE(
MIN(YourTable[Appointment]),
FILTER(
YourTable,
YourTable[Customer Name] = EARLIER(YourTable[Customer Name]) &&
YourTable[Childs Name] = EARLIER(YourTable[Childs Name]) &&
YourTable[Appointment] > EARLIER(YourTable[Appointment])
)
)
and
Result :=
IF(
ISBLANK(YourTable(Next Appointment]),
"No Rebook",
"Rebook"
)
it worked!!!! Thank you so much!!
Hi,
2 calculated columns:
Next Appointment :=
CALCULATE(
MIN(YourTable[Appointment]),
FILTER(
YourTable,
YourTable[Customer Name] = EARLIER(YourTable[Customer Name]) &&
YourTable[Childs Name] = EARLIER(YourTable[Childs Name]) &&
YourTable[Appointment] > EARLIER(YourTable[Appointment])
)
)
and
Result :=
IF(
ISBLANK(YourTable(Next Appointment]),
"No Rebook",
"Rebook"
)
User | Count |
---|---|
116 | |
73 | |
58 | |
49 | |
48 |
User | Count |
---|---|
171 | |
122 | |
60 | |
59 | |
56 |