Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi, I've been puzzling over this for some time. I'd like to use a column called "Previous Quarter" in my Calendar. I was able to back into current quarter, but I'm having a heck of a time with this one. Can anyone help?
Solved! Go to Solution.
Hi @rdwhite ,
Follow Steps Below (Creating Calculated Columns) assuming my date table name is FullDDate:
1-Create Calculated Column:
YearQuarterNo =
CONVERT (
CONCATENATE (
YEAR ( FullDDate[Date] ),
CONCATENATE ( "0", FullDDate[Quarter] )
),
INTEGER
)
Here is what I've tried without sucess so far: "Previous Quarter Boolean = VAR PrevQuarter = DATEADD('Calendar'[Date],-1,QUARTER) RETURN IF(YEAR(PrevQuarter) = YEAR('Calendar'[Date]) && QUARTER(PrevQuarter) = QUARTER('Calendar'[Date]), TRUE(), FALSE() ) " All returned False. Also: "Previous Quarter Boolean = VAR PrevQuarterStartDate = DATE(YEAR('Calendar'[Date]), SWITCH(QUARTER('Calendar'[Date]), 1, 10, 2, 1, 3, 4, 4, 7), 1) VAR PrevQuarterEndDate = EOMONTH(PrevQuarterStartDate, 2) RETURN IF('Calendar'[Date] >= PrevQuarterStartDate && 'Calendar'[Date] <= PrevQuarterEndDate, TRUE(), FALSE() )"
Have you checked my answer? I think it is what you need.
The first step did not work...
Maybe your are missing fullddate[quarter]
This is a calculated column as well:
quarter=QUARTER(fullddate[date])
Then it is used as one of the inputs in step1.
fullddate[quarter] in my formula is just number. 1,2,3,4 (without qtr string)
You can make it using a calculated column:
quarter=QUARTER(fullddate[date])
Hi @rdwhite ,
Follow Steps Below (Creating Calculated Columns) assuming my date table name is FullDDate:
1-Create Calculated Column:
YearQuarterNo =
CONVERT (
CONCATENATE (
YEAR ( FullDDate[Date] ),
CONCATENATE ( "0", FullDDate[Quarter] )
),
INTEGER
)
Thanks for stepping through this with me. I had even resulted to ChatGPT...
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
87 | |
87 | |
84 | |
66 | |
49 |
User | Count |
---|---|
130 | |
110 | |
93 | |
70 | |
67 |