Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I am new to DAX - I'm creating a new measure to measure the time between 2 dates. In using DATEDIFF its only showing me other calculated measures and not the other date fields to select from. Why won't it show me the DATE fields I have data in?
Solved! Go to Solution.
Hi , @Anonymous
Here is a demo :
create a measure as below:
Date Dif2 = DATEDIFF(MAX(A[Goal Date]),MAX(A[Finish]),DAY)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi , @Anonymous
Here is a demo :
create a measure as below:
Date Dif2 = DATEDIFF(MAX(A[Goal Date]),MAX(A[Finish]),DAY)
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
In measures, you have to refer to columns using an aggregation like MAX, MIN, SUM, etc.
If the are on the same table you can use datediff in a column. If they are on a different table or in you want measure then it need context.
And the pbix file: https://www.dropbox.com/s/y47ah38sr157l7t/Order_delivery_date_diff.pbix?dl=0
look for 4 ways
Hi @Anonymous
if your start and end dates to datediff calculate placed in the same row you should use a New Column, not measure
User | Count |
---|---|
75 | |
75 | |
45 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |