Forum Discussion
kballar1
2 years agoHelper I
SUMX Help
I created a measure using SUMX to get the number of days between two dates so that I could see how many days it takes an account manager to approve something once it's submitted for approval...
- 2 years ago
Hi kballar1
In your data screenshot, the Physical Date and Price Approved Date are not in Date format. Please make both dates as Date format.
Use Power Query to correct your data datatype
Then use the measureMeasure = DATEDIFF(SELECTEDVALUE('Table (2)'[Physical Date]),SELECTEDVALUE('Table (2)'[Price Approved]),DAY)
You will find all date diff are correct
If solved your requirement, please mark this answer as SOLUTION.
Thanks
Pijush
PijushRoy
2 years agoCommunity Champion
HI kballar1
Please try below dax
DATEDIFF = DATEDIFF('Table (2)'[Physical Date],'Table (2)'[Price Approved],DAY)
Please show the expected outcome based on the sample data you provided. Find how to provide sample data
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
If solved your requirement, please mark this answer as SOLUTION.
Thanks
Pijush
kballar1
2 years agoHelper I
Hi, that didn't work, here is the error message