The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi all,
i created a column of the current date = today() and important to know today is 03/01/2023
What we do is taking a snapshot 10 days after each quarter. And from there on i create a column to see the previous quarter.
So with this formule i want to see the quarter of the previous year only i see now blank values. The Dateadd functions doesn't work for previous year. If i change the formule in -1 day than i does work. And if i change it into -10 days than is doenst work anymore because it is in the previous year. I read only that the dateadd function only work for date values when the excist in the datetable. I wondering how does it still work when i have a current date of today() and the formule still work if i add +3 Months when there is no date data because i am revering to the current date and that is only today. How can this work for in the previous year?
Solved! Go to Solution.
@delmayhan
Please try
Date of previous quarter =
VAR CurrentDate = 'Issue snapshot'[Current Date]
VAR AdjustedDate = CurrentDate - 10
VAR Days = DAY ( AdjustedDate )
VAR PreviousDate = EOMONTH ( AdjustedDate, - 4 )
RETURN
PreviousDate + Days
Hi @tamerj1 i expect the result ; Current date = Today() (03-01-2023 -10 days) = 24-12-2023 That is Q4 and then -1 quarter = Q3 So i Expect dates from Q3. Like 24-09-2022
You can test it yourself creating a column of today and then the above DAX formule, i expect data in the year 2022 but i get blank values back.
@delmayhan
Please try
Date of previous quarter =
VAR CurrentDate = 'Issue snapshot'[Current Date]
VAR AdjustedDate = CurrentDate - 10
VAR Days = DAY ( AdjustedDate )
VAR PreviousDate = EOMONTH ( AdjustedDate, - 4 )
RETURN
PreviousDate + Days
User | Count |
---|---|
11 | |
8 | |
6 | |
6 | |
6 |
User | Count |
---|---|
23 | |
14 | |
13 | |
10 | |
8 |