Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Dear All,
Im new to dax and I need Help on below topic.I need to bring customer name from first table to second table(Desired output)according to time and Salesman(Two cirterias).In first table time mentioned in time period and in second table its precise.
Table 1 | |||
Customer | Salesman Name | Start Time | End Time |
Carrefour City Centre | Suraj | 04-11-2023, 08:38:25 AM | 04-11-2023, 08:38:41 AM |
Carrefour City Centre | Suraj | 04-11-2023, 08:38:41 AM | 04-11-2023, 08:42:38 AM |
Carrefour City Centre | Suraj | 04-11-2023, 08:42:38 AM | 04-11-2023, 08:42:48 AM |
Carrefour City Centre | Suraj | 04-11-2023, 08:42:48 AM | 04-11-2023, 09:18:20 AM |
MONOPRIX SHOP | Suraj | 04-11-2023, 09:18:20 AM | 04-11-2023, 09:18:33 AM |
MONOPRIX SHOP | Suraj | 04-11-2023, 09:18:33 AM | 04-11-2023, 09:34:57 AM |
carrefour,landmark | Raja | 04-11-2023, 09:34:57 AM | 04-11-2023, 10:43:29 AM |
carrefour,landmark | Raja | 04-11-2023, 10:43:29 AM | 04-11-2023, 10:43:40 AM |
carrefour,landmark | Raja | 04-11-2023, 10:43:40 AM | 04-11-2023, 10:44:21 AM |
Table 2 | ||
Time | Salesman | Desired output |
04-11-2023, 08:50:07 AM | Suraj | Carrefour City Centre |
04-11-2023, 09:36:30 AM | Raja | carrefour,landmark |
Solved! Go to Solution.
Hi @Sajeerahammed ,
try to add a calculated column in table2 like:
Column =
MAXX(
FILTER(
table1,
Table1[Salesman Name]=Table2[Salesman]
&&Table1[Start Time]<=Table2[Time]
&&Table1[End Time]>=Table2[Time]
),
Table1[Customer]
)
it worked like:
Hi @Sajeerahammed ,
try to add a calculated column in table2 like:
Column =
MAXX(
FILTER(
table1,
Table1[Salesman Name]=Table2[Salesman]
&&Table1[Start Time]<=Table2[Time]
&&Table1[End Time]>=Table2[Time]
),
Table1[Customer]
)
it worked like:
thank you sir...Problem solved
@Sajeerahammed, I believe you can use TREATAS function to use multiple condtions rather than the V lookup
Solved: Re: TREATAS to filter multiple columns in combinat... - Microsoft Fabric Community
Creating Relationship Based on Multiple Fields in Power BI Using TREATAS DAX Function - RADACAD
The question is why do you need a Table 2? All the information seems ready in Table 1 for presentation. You just need to categorize them in visual?