Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don'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.

Reply
Elisa112
Helper IV
Helper IV

Summarize column and filter 2 tables

Hi Experts

 

I am having an issue figuring out how to summarise and filter columns from different tables which are connected appropriately via one to many relationships.  So far I have managed to figure out I need a to summarise and filter two tables, I am trying to bring back 2 dates, 1 from the meeting table (Engagement type) and 1 from the Assess table. Conditions active customers (status from customer table), Assess types "new" and "first" from Assess table. 

 

My dax so far is below but I am getting errors on this:

 

Summary_Table2 =
SUMMARIZECOLUMNS (
    'Cust[C_ID],
    'Manager'[M_Name],
    "Customer Meeting",
        CALCULATE (
            MIN ( 'Appointments'[Meeting Date]),
            'Appointments'[Type] = "Engagement"),
    "Assess",
        CALCULATE (
            MIN ('Assess'[Assessment Date]),
           FILTER('Assess',
           'Assess'[C_ID] = SELECTEDVALUE('Assess'[C_ID]) &&
                 ('Assess'[Assessment Type] = "New") && ('Assess'[Assessment Stage] = "First")
           ),
 
Errors so far = Argument 3 in Calculate function required (not sure what this means)
 
From 3 Tables: Cust/Meetings/Assess  all joined to Meetings and Assess are joined to Customer on C_ID via one-to-many relationships. 
I am trying return a table that looks like this:
 
Cust_Meeting   C_ID            M_Name         Assess      
12 June             001              KMP                15 June
15 June             002              PNN                19 June
 
Any help appreciated, thanks in advance.
1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Elisa112 ,

 

Believe that you are missing some parenteses and you have one comma at the end try this changes:

 

Summary_Table2 =
SUMMARIZECOLUMNS (
    "Customer_ID", 'Cust'[C_ID],
    "Manager", 'Manager'[M_Name],
    "Customer Meeting",
        CALCULATE (
            MIN ( 'Appointments'[Meeting Date] ),
            'Appointments'[Type] = "Engagement"
        ),
    "Assess",
        CALCULATE (
            MIN ( 'Assess'[Assessment Date] ),
            FILTER (
                'Assess',
                'Assess'[C_ID] = SELECTEDVALUE ( 'Assess'[C_ID] )
                    && ( 'Assess'[Assessment Type] = "New" )
                    && ( 'Assess'[Assessment Stage] = "First" )
            )
        )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
Elisa112
Helper IV
Helper IV

thanks so much

MFelix
Super User
Super User

Hi @Elisa112 ,

 

Believe that you are missing some parenteses and you have one comma at the end try this changes:

 

Summary_Table2 =
SUMMARIZECOLUMNS (
    "Customer_ID", 'Cust'[C_ID],
    "Manager", 'Manager'[M_Name],
    "Customer Meeting",
        CALCULATE (
            MIN ( 'Appointments'[Meeting Date] ),
            'Appointments'[Type] = "Engagement"
        ),
    "Assess",
        CALCULATE (
            MIN ( 'Assess'[Assessment Date] ),
            FILTER (
                'Assess',
                'Assess'[C_ID] = SELECTEDVALUE ( 'Assess'[C_ID] )
                    && ( 'Assess'[Assessment Type] = "New" )
                    && ( 'Assess'[Assessment Stage] = "First" )
            )
        )
)

Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.