Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I was wondering if it is possible to create a 'Quarter Elapsed column' as a calculated column for each row based on the latest Year and Quarter.
Extracted year and quarter out of case date.
If 2022,4 (Year - 2022 Quarter - 4) is the latest quarter, then the quarter elapsed is 0,
then 2022,3 quarter elapsed is 1,
then 2022,2 quarter elapsed is 2,
then 2022,1 quarter elapsed is 3,
then 2021,4 quarter elapsed is 4.
F
Thanks for your help.
@devika , Try new column like
var _date = Date([Year], 3*[Quarter],1)
var _qtr_st = mod(month(_date),3)
return eomonth(_date, -1*Switch(_rem,0,3,_rem))+1
var _qtr_today = mod(month(today()),3)
return eomonth(today(), -1*Switch(_rem,0,3,_rem))+1
return
datediff(_qtr_st,_qtr_today,quarter)
User | Count |
---|---|
140 | |
113 | |
104 | |
77 | |
64 |
User | Count |
---|---|
135 | |
120 | |
101 | |
71 | |
61 |