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
Nidhi_Kochrekar
Frequent Visitor

How to use Datediff and with allexcept in one measure

Hello 

 

I am trying to get date difference with allexcept 

 

Seconds to open = CALCULATE(FILTER(ALLEXCEPT(Append1,Append1[ID]),DATEDIFF(Append1[Submit Date],Append1[Last Modified Date],SECOND)))
 
 
2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Nidhi_Kochrekar 

 

Can you provide some sample data and expected output you hope to get? 

 

The first variable in CALCULATE() should be an expression which returns a single value while FILTER() will return a table. 

 

ALLEXCEPT – DAX Guide

CALCULATE - DAX Guide

DATEDIFF - DAX Guide

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@Nidhi_Kochrekar , New column

Seconds to open = CALCULATE(DATEDIFF(Append1[Submit Date],Append1[Last Modified Date],SECOND), ALLEXCEPT(Append1,Append1[ID]))

 

new table

Seconds to open = CALCULATE(AverageX(Append1, DATEDIFF(Append1[Submit Date],Append1[Last Modified Date],SECOND)), ALLEXCEPT(Append1,Append1[ID]))

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.