Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. 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...
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 53 | |
| 40 | |
| 37 | |
| 19 | |
| 18 |
| User | Count |
|---|---|
| 69 | |
| 67 | |
| 34 | |
| 33 | |
| 30 |