Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
DATEDIFF doesn't show the expected difference. I am trying to calculate "Months from first purchase".
Both columns are the same date format. The difference I get is not correct.
This is a calcualted column:
Thanks,
Erez
Solved! Go to Solution.
It looks like you pulled that column into a visual and the field is set to SUM. My guess is the second line represents 3 records in your data set (4 months diff * 3 = 12) and the third line is covering 2 records. Try changing the field to show the AVERAGE.
Could it be your date format? I tried with MM/DD/YYYY format and DATEDIFF works perfectly fine.
Another alternate formula could be:
Hi @erezbenmoshe ,
Works here.
Proud to be a Super User!
It looks like you pulled that column into a visual and the field is set to SUM. My guess is the second line represents 3 records in your data set (4 months diff * 3 = 12) and the third line is covering 2 records. Try changing the field to show the AVERAGE.
You are right!! I am embarrassed that I did not figure it out myself 🙂
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 33 | |
| 29 | |
| 24 |
| User | Count |
|---|---|
| 127 | |
| 115 | |
| 87 | |
| 70 | |
| 69 |