Forum Discussion
Saxon202202
3 years agoHelper III
Average
I have the following three column are Date@Time, Time1 and Time2 in direct query. I created new column based on the Time1. The columns name is Hour. I have two requirements: 1. I want to create ti...
Saxon202202
3 years agoHelper III
Greg_Deckler ,
Thanks for your reply. Now, I convert the both times to seconds and finout the time difference in seconds. I try to convert the time difference measure into duration but result is 00:00:00.
Attached the csv and PBI file.
https://www.dropbox.com/s/tfcipx08wh6h7sc/Average-Measure.pbix?dl=0
https://www.dropbox.com/s/mf04tzid2wub1ay/Time%20conversation.csv?dl=0
Ashish_Mathur
3 years agoSuper User
Hi,
Try these 2 calculated column formulas
Column = if('Table'[Time2]=BLANK(),BLANK(),'Table'[Time2]-'Table'[Time1])Column 2 = CALCULATE(AVERAGE('Table'[Column]),FILTER('Table','Table'[Hour]=EARLIER('Table'[Hour])))
Hope this helps.
- Saxon2022023 years agoHelper III
Ashish_Mathur, Thanks for your reply. I am looking for measures instead of calculated column because calculated column not supporting in direct query.
Thank you.