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.
Hi,
As many others here, I would like to get the count difference of two dates.
I have one column called "closed dates" and another column called "Opened Dates"
When I try to do the "duration.day" formular in the query editor, the outcome only shows me errors.
When I try to do a dax measure with DateDiff it only allows me to select measures from that data table, but not simple columns.
My two date columns are categorized as "Date" so that cannot be the problem.
Is there a way to use the DateDiff function with normal date columns?
Solved! Go to Solution.
Hi @patricPBI ,
You have got extra COMMA for MAX function. Remove them please as highlighted below:
Thanks,
Pragati
Hi @patricPBI ,
Try a DAX measure something like this:
Diff = DATEDIFF(MAX(Date1), MAX(Date2), Month)
For details on DATEDIFF, refer following link:
https://docs.microsoft.com/en-us/dax/datediff-function-dax
Thanks,
Pragati
Hi @Pragati11 ,
UNfortunetely, I get the following error message:
Also, for MAX, it is asking me fo a Scalar 2. What do I have to input here?
Best regards,
Patric
HI @patricPBI ,
Unfortunately, just the screesnhot of your error doesn't help.
Share screesnshot of the measure you are writing.
Thanks,
Pragati
Hi @patricPBI ,
You have got extra COMMA for MAX function. Remove them please as highlighted below:
Thanks,
Pragati
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |