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 moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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...
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
User | Count |
---|---|
92 | |
91 | |
84 | |
80 | |
49 |
User | Count |
---|---|
146 | |
137 | |
109 | |
68 | |
55 |