cancel
Showing results for 
Search instead for 
Did you mean: 
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]))

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

Helpful resources

Announcements
Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Top Solution Authors
Top Kudoed Authors