Forum Discussion
Mohammadwazeri
Helper III
5 years agoHow Can I Create Current Quarter, Next Quarter, & Next two Quarters Fields?
Hi,
I need to get the answer for this ASAP.
I stuck in creating current, next, & next tow quarter fields in powerbi desktop, could you please give me an idea how to create these fields using dax or any other way in powerbi.
Thanks
Mohammad
Mohammadwazeri in this case, you can follow the below approach to create 3 measures
1.
current qtr =var cqtr = QUARTER(TODAY())var cyear= YEAR(TODAY())var curr = cyear & "Q" & cqtrreturncurr2.next1 qtr =var cqtr = QUARTER(TODAY())var cyear= YEAR(TODAY())var next1 = IF(cqtr=4, cyear+1 & "Q1", cyear & "Q" & cqtr+1)returnnext13.next2 qtr =var cqtr = QUARTER(TODAY())var cyear= YEAR(TODAY())var next2 = IF(cqtr>=3, cyear+1 & "Q1", cyear & "Q" & cqtr+1)returnnext2i hope it helps you
2 Replies
- Mohammadwazeri
Helper III
Thank you so much, it's working.
- negi007
Community Champion
Mohammadwazeri in this case, you can follow the below approach to create 3 measures
1.
current qtr =var cqtr = QUARTER(TODAY())var cyear= YEAR(TODAY())var curr = cyear & "Q" & cqtrreturncurr2.next1 qtr =var cqtr = QUARTER(TODAY())var cyear= YEAR(TODAY())var next1 = IF(cqtr=4, cyear+1 & "Q1", cyear & "Q" & cqtr+1)returnnext13.next2 qtr =var cqtr = QUARTER(TODAY())var cyear= YEAR(TODAY())var next2 = IF(cqtr>=3, cyear+1 & "Q1", cyear & "Q" & cqtr+1)returnnext2i hope it helps you