cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors