Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
How to get the difference between release_year and date_added in measure
release_year datatype is the whole number.
date_added datatype is the date.
and we cant make changes in datatypes it's fixed.
so how we can convent and get the results.
thanks
Solved! Go to Solution.
@Anonymous , if you need in month try like
datediff([date_added], date([release_year],1,1), month)
for measure, you need like
Sumx(Table, datediff([date_added], date([release_year],1,1), month))
or
Averagex(Table, datediff([date_added], date([release_year],1,1), month))
or
Can you share sample data and sample output in table format?
@Anonymous , Try new columns like
datediff([date_added], date([release_year],1,1), day) //or use month or year
or
datediff([date_added], date([release_year],12,31), day) //or use month or year
the numbers are not correct as expected.
November 13 2020 - 2019 = 23
12 months of 2019 and 11 months of = 22.1 something
need the difference in months and sec thing that should be created in measure, not in column measure
@Anonymous , if you need in month try like
datediff([date_added], date([release_year],1,1), month)
for measure, you need like
Sumx(Table, datediff([date_added], date([release_year],1,1), month))
or
Averagex(Table, datediff([date_added], date([release_year],1,1), month))
or
Can you share sample data and sample output in table format?
this works
Averagex(Table, datediff([date_added], date([release_year],1,1), month))
Thanks @amitchandak
thanks for feedbacks and point to the solution that works for your scenario, this will help others too 🙂
@Anonymous what is the expected result? can you show us an example please.
november 13 2020 - 2019 = 23
12 months of 2019 and 11 months of = 22.1 something
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 97 | |
| 74 | |
| 50 | |
| 47 | |
| 44 |