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
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
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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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