Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have the following date table and i want to create a calculated column using either the SAMEPERIODLASTYEAR or PREVIOUSYEAR or DATEDIFF and not the easy escape of recreating it via DATE() as i want leap years to be taken care of and also to understand better how DAX works.
Here is an example date table TBL:
date
03/01/2024 |
03/02/2024 |
03/03/2024 |
03/04/2024 |
03/05/2024 |
03/06/2024 |
03/07/2024 |
03/08/2024 |
03/09/2024 |
03/10/2024 |
03/11/2024 |
03/12/2024 |
03/13/2024 |
03/14/2024 |
for ease let's call the calculated column "LAST_YEAR"
Tried all of the following with the respective issued i got stuck at:
DATEADD(TBL[date], -1, YEAR)
Solved! Go to Solution.
@PowerBeeTree Take a look at the video below. The PBIX file is available from the associated GitHub repository. You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
This should allow you to understand how those functions are *supposed* to work.
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
helpful resources to understand how these functions work and understand if these tasks can be completed. Looks like the name of the functions is confusing and won't allow by design to achieve the task at request.
@PowerBeeTree Take a look at the video below. The PBIX file is available from the associated GitHub repository. You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000
This should allow you to understand how those functions are *supposed* to work.
Also, see if my Time Intelligence the Hard Way provides a different way of accomplishing what you are going for.
https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-TIT...
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 |
---|---|
109 | |
102 | |
84 | |
79 | |
68 |
User | Count |
---|---|
120 | |
110 | |
94 | |
81 | |
77 |