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.
Hi
I'm creating Date function (year and month) in Date view (not Query) with DAX like below:
Year = Year (Reference to the table [specific column consisting dates])
I get the Year (only) from that column and it is ok. However, in modelling I see that Data type is Whole Number same as the format and if I change to date (like the columns where dates are) that it change different value - 1905 (not the years as they should be).
Another interesting thing is when I go to my Query, I can not see even this column created?
What is the problem?
Solved! Go to Solution.
it is not such interesting as you think.
1. DAX calculated columns and measures aren't available in query mode. But Custom columns from Power query mode are available in DAX. DAX is the business logic lnguage, not data shaping
2. YEAR() function gets you integer and it is a whole number
3. if you want to return whole number into date, date wll be calculated as 1900+ Whole Number DAYS. so 2012 days is exactly 5 years + something
do not hesitate to give a kudo to useful posts and mark solutions as solution
it is not such interesting as you think.
1. DAX calculated columns and measures aren't available in query mode. But Custom columns from Power query mode are available in DAX. DAX is the business logic lnguage, not data shaping
2. YEAR() function gets you integer and it is a whole number
3. if you want to return whole number into date, date wll be calculated as 1900+ Whole Number DAYS. so 2012 days is exactly 5 years + something
do not hesitate to give a kudo to useful posts and mark solutions as solution
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 |
---|---|
49 | |
26 | |
20 | |
15 | |
12 |
User | Count |
---|---|
57 | |
49 | |
43 | |
19 | |
18 |