This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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...
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 23 | |
| 23 | |
| 20 | |
| 16 |
| User | Count |
|---|---|
| 63 | |
| 38 | |
| 25 | |
| 23 | |
| 22 |