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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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)

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!