Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowGet inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.
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...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
79 | |
42 | |
40 | |
35 |