Forum Discussion
SUMX Help
- 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
Hi,
I tried that but as you can see, it works one some but not the other. There are not 48 days between 12/21/2023-1/02/2024. How do I fix this?
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 measure
Measure = 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
- kballar12 years agoHelper I
It was already marked as date I was just presenting the data in a table visual. But I tried the code you suggested and it worked. Thank you!