Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
11 | |
11 | |
10 | |
9 | |
9 |
User | Count |
---|---|
17 | |
13 | |
12 | |
11 | |
8 |