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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Create a DAX with several conditions

Hi all,

I've the table on the left and I want to obtain the table on the right.
Already use the SUMARIZEDCOLUMN and works fine if I don´t include the Activity field, but in that case, I only get the maximum Elapsed time but I do not know what was the Activity responsible for that.

table.JPG

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , use this in place of activity

lastnonblankvalue(table[elapsed time],max(table[Activity]))

 

and for elapsed time do not use aggregation (do not summarize)

Anonymous
Not applicable

@amitchandak 

If I use something like:

New Table = SUMMARIZECOLUMNS (
                                    'Date'[Date],
                                    'Schedules[Client ID],
                                     FIRSTNONBLANKVALUE( Schedules [Activity], MAX ( Schedules [Time in Acivity] ) ) )

I get an error saying: The SUMMARIZATIONCOLUMNS function expects a table expression for argument '3', but a string or numeric expression was used.

Anonymous
Not applicable

@Anonymous

Please check your syntax of SUMMARIZECOLUMNS. You are not using it properly. Go to dax.guide/summarizecolumns to know how to use it.

Best
D

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors