Forum Discussion

Prasad23's avatar
Prasad23
Frequent Visitor
2 years ago

Current Quarter and Next Quarter

 Hi Team,

 

please help me to get Current quarter sales and Next quarter sales. And i also want to show Quarter names in card(Like Q4 is current quarter and Q1 is next Quarter). Fiscal Year starts from April.

 Like; April,May,june:- Q1
        July, Aug, Sep ;- Q2
       Oct,Nov, Dec :- Q3

       Jan, Feb,Mar:- Q4

Here we are not using any Slicer selections.

 

I have date column which contains  data upto 2025.


 

Regards,
Prasad.

3 Replies

  • CurrentQTR =
    var month = MONTH(NOW())
    var curqtr = IF(MONTH In {1,2,3},"Q4",IF(MONTH In {4,5,6},"Q1",IF(MONTH In {7,8,9},"Q2",IF(MONTH In {10,11,12},"Q3"))))
    RETURN curqtr
     
    NextQTR =
    var month = MONTH(NOW())
    var curqtr = IF(MONTH In {1,2,3},"Q4",IF(MONTH In {4,5,6},"Q1",IF(MONTH In {7,8,9},"Q2",IF(MONTH In {10,11,12},"Q3"))))
    var nxtqtr = IF(curqtr="Q1","Q2",IF(curqtr="Q2","Q3",IF(curqtr="Q3","Q4",IF(curqtr="Q4","Q1"))))
    RETURN nxtqtr

     

    Try to add a column in calender table

    Quarter = IF('Calendar'[DATA].[MonthNo] In {4,5,6},"Q1",IF('Calendar'[DATA].[MonthNo] In {7,8,9},"Q2",IF('Calendar'[DATA].[MonthNo] In {10,11,12},"Q3","Q4")))
     
    • Prasad23's avatar
      Prasad23
      Frequent Visitor

      Hi nareshr89 ,

       

      Quarter name works well and i need,
      Current quarter sales.& Next Quarter sales
      For Current Quarter i have wrote a dax like this:
      please correct me it is wrong.
      Calculate([sales], datesinperiod(Table[date], today(),0,Quarter)).

       and i require for next quarter also.

       

      Regards,
      Prasad

      • Dangar332's avatar
        Dangar332
        Icon for Resident Rockstar rankResident Rockstar

        Hi, Prasad23 

        for next full quarter use  PARALLELPERIOD()

        next quarter =
            Calculate(
               [sales],
               PARALLELPERIOD(Table[date], +1,Quarter)
            )