Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Experts
I am having roubling getting the correct output in a summarised table, I have 2 tables joined on a customerid which have the following data
Customer
CustID Staff Status ConfirmationDate ApprovalDate
001 LEH Active 10 June 11 June
002 MJJ Inactive 9 May 12 May
003 BNN Active 8 April 16 April
Meetings
Cust ID MeetID MeetDate MeetingType
001 005 13 June Introduction
002 007 14 May Assess
003 009 18 April Introduction
I need to create a summarise table to include active customers only. The summarised table should include the confirmation date and approval date from the Customer table but only Introduction meetings from the Meetings table. I also need to show the date difference in days between confirmation and approval dates.
my cnrrent dax works ok but I am having trouble filtering to active customers only, here is my current logic:
Solved! Go to Solution.
@Elisa112 , Try like , Join two tables on customer ID.
SUMMARIZECOLUMNS(
'Customer'[CustID],
'Customer'[Staff],
'Customer'[ConfirmationDate],
'Customer'[ApprovalDate],
"Days Between", 'Customer'[ApprovalDate] - 'Customer'[ConfirmationDate],
"Introductory Meeting",
CALCULATE(
MIN('Meetings'[MeetDate]),
'Meetings'[MeetingType] = "Introduction"
),
FILTER(
'Customer',
'Customer'[Status] = "Active"
)
)
or a meausre like
Active Customers with Intro Meeting =
CALCULATE(
COUNTROWS('Customer'),
'Customer'[Status] = "Active",
CALCULATE(
COUNTROWS('Meetings'),
'Meetings'[MeetingType] = "Introduction",
RELATEDTABLE('Meetings')
) > 0
)
Measures like
M1 = CALCULATE( COUNTROWS('Customer'), filter('Customer' 'Customer'[Status] = "Active"))
M2 = CALCULATE(COUNTROWS('Meetings'), Filter('Meetings', 'Meetings'[MeetingType] = "Introduction" ))
Active Customers with Intro Meeting = sumx(Values('Customer'[CustID]), if(Not(isblank(M1)) && Not(isblank(M2)), [CustID], blank()))
Hi @Elisa112 ,
I create two tables as you mentioned.
Then I create a new table and here is the DAX code.
Table =
SUMMARIZECOLUMNS (
'Customer'[CustID],
'Customer'[Staff],
'Customer'[ConfirmationDate],
'Customer'[ApprovalDate],
"Introductory Meeting",
CALCULATE (
MIN ( 'Meetings'[MeetDate] ),
FILTER (
'Meetings',
'Meetings'[Cust ID] = SELECTEDVALUE ( 'Customer'[CustID] )
&& 'Meetings'[MeetingType ] = "Introduction"
)
)
)
Finally I create a measure and get what you want.
Measure = DATEDIFF(MAX('Customer'[ConfirmationDate]),MAX('Customer'[ApprovalDate]),DAY)
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous I didnt use your solution but thank you for your help and time. I may use it another time.
Thanks again!
@Elisa112 , Try like , Join two tables on customer ID.
SUMMARIZECOLUMNS(
'Customer'[CustID],
'Customer'[Staff],
'Customer'[ConfirmationDate],
'Customer'[ApprovalDate],
"Days Between", 'Customer'[ApprovalDate] - 'Customer'[ConfirmationDate],
"Introductory Meeting",
CALCULATE(
MIN('Meetings'[MeetDate]),
'Meetings'[MeetingType] = "Introduction"
),
FILTER(
'Customer',
'Customer'[Status] = "Active"
)
)
or a meausre like
Active Customers with Intro Meeting =
CALCULATE(
COUNTROWS('Customer'),
'Customer'[Status] = "Active",
CALCULATE(
COUNTROWS('Meetings'),
'Meetings'[MeetingType] = "Introduction",
RELATEDTABLE('Meetings')
) > 0
)
Measures like
M1 = CALCULATE( COUNTROWS('Customer'), filter('Customer' 'Customer'[Status] = "Active"))
M2 = CALCULATE(COUNTROWS('Meetings'), Filter('Meetings', 'Meetings'[MeetingType] = "Introduction" ))
Active Customers with Intro Meeting = sumx(Values('Customer'[CustID]), if(Not(isblank(M1)) && Not(isblank(M2)), [CustID], blank()))
@amitchandak Thank you this works, I had to edit the join a little and delete the days between column as I could not get it to work but overall this has helped my understanding a lot.
You are a star!
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
31 | |
26 |
User | Count |
---|---|
95 | |
50 | |
43 | |
40 | |
35 |