Forum Discussion
Akhil_1411
6 years agoHelper IV
Current Quarter in Date Table
Hi,
I was trying to create the current quarter yes or no in the date table. But my below dax is not happening.
current quarter =
IF(ROUNDUP(MONTH('Base Date'[Date])/3, 0)=ROUNDUP(MONTH(TODAY())/3, 0),"yes","no")
The above dax giving the result for "yes" result for quarters 2018 Q3 and 2019 Q3.
Can anyone help me with this.
Thanks,
Akhil.
Akhil_1411 , better to qtr start and end day .
If(Today()>=[start qtr] && today()<=[end qtr], "Current Qtr", "Other Qtr")
For qtr start date yoy can use startofquarter for standard qtr and for end date endofquarter
or refer :
3 Replies
- v-xuding-msftCommunity Support
Hi Akhil_1411 ,
You could add a condition of year. Please try like this:
Column = var qtr = QUARTER('Date'[Date]) var curr_qtr =QUARTER(TODAY()) var yr = YEAR('Date'[Date]) var curr_yr = YEAR(TODAY()) return IF(qtr = curr_qtr && yr = curr_yr,curr_qtr,BLANK()) - v-xuding-msftCommunity Support
Glad you have got the solution😉. Sorry that I don't refresh website before posting.
- amitchandakSuper User
Akhil_1411 , better to qtr start and end day .
If(Today()>=[start qtr] && today()<=[end qtr], "Current Qtr", "Other Qtr")
For qtr start date yoy can use startofquarter for standard qtr and for end date endofquarter
or refer :