Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello
I want to convert my interger column values into years using DAX fuincation in my tabular model . Please help me to do this.
Date1 Date2 Diff (In Days) Expected Output
01-01-2017 01-01-2016 365 1
01-01-2017 01-01-2014 1096 3
01-01-2017 31-12-2010 1097 3.1
Solved! Go to Solution.
You should create two calculated columns (YEAR) & second column with a SWITCH() function that corresponds to the Year such as if it is 2016, then 365 days etc..
Then simply divide the days column with a second column.
Thanks,
Bhavesh
You should create two calculated columns (YEAR) & second column with a SWITCH() function that corresponds to the Year such as if it is 2016, then 365 days etc..
Then simply divide the days column with a second column.
Thanks,
Bhavesh
Thanks Bhavesh for your suggestion. I am also looking for Where condition in the DAX expression
Select name , id from table where id=2 how to write it in DAX
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
109 | |
90 | |
64 |