Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

QoQ Calculation for Fiscal Quarter

Hi, I have fiscal Year/quarter starting from Feb, and in following format : 2018Q1 2018Q2 please help me on QoQ calculation, previous quarter and dateadd function doesnt work on custom calendar which i created according to my organization needs......it should display in following format: Quarer Sales Last Quarter 2018Q1 100 2018Q2 200 100 2018Q3 300 200
  • hi, Anonymous

    Does your custom calendar have no date column, just like this:

    If so, you could try this way as below:

    Step1:

    Add a rank column for fiscal Year/quarter

    rank = RANKX('calendar','calendar'[ fiscal Year/quarter],,ASC )

    Note: You could add the rank column for the custom calendar according to the custom.

    Step2:

    Create a relationship between data table and custom calendar table

    Step3:

    Use this formula to add a measure

    Measure = CALCULATE(SUM('Table'[value]), FILTER(ALL('calendar'),'calendar'[rank]=MAX('calendar'[rank])-1))

    Result:

     

    and here is pbix file, please try it.

    If it is not your case, please share sample pbix file or some data sample and expected output. Do mask sensitive data before uploading

     

     

    Best Regards,

    Lin

     

     

     

     

     

  • Anonymous's avatar
    Anonymous
    7 years ago

    Hi Lin,

     

    I tried your solution again, and it worked.

    Thank youuuuuuuuuuuuuuuuuuu so muchhhhhhhhhhhhh.

     

    Now other issue is apple to apple comparison, if in current quarter only 6 weeks have passed so wish to compare this with last quarter with 6 weeks data only.....please help me again.......

     

    Regards

    Rohit

10 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity Support

    hi, Anonymous

    Does your custom calendar have no date column, just like this:

    If so, you could try this way as below:

    Step1:

    Add a rank column for fiscal Year/quarter

    rank = RANKX('calendar','calendar'[ fiscal Year/quarter],,ASC )

    Note: You could add the rank column for the custom calendar according to the custom.

    Step2:

    Create a relationship between data table and custom calendar table

    Step3:

    Use this formula to add a measure

    Measure = CALCULATE(SUM('Table'[value]), FILTER(ALL('calendar'),'calendar'[rank]=MAX('calendar'[rank])-1))

    Result:

     

    and here is pbix file, please try it.

    If it is not your case, please share sample pbix file or some data sample and expected output. Do mask sensitive data before uploading

     

     

    Best Regards,

    Lin

     

     

     

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Lin for quick response, i really appreciate this, however couldnt find the pbbix file but notes were helpful.

      The solution is good, however not working for me.

       

      I am unble to attach file as this forum doesnt have any option, kindly suggest me another way or if you can share your email address would be grateful to you.

       

      Best Regards

      Rohit

      [email protected]

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Lin,

       

      I tried your solution again, and it worked.

      Thank youuuuuuuuuuuuuuuuuuu so muchhhhhhhhhhhhh.

       

      Now other issue is apple to apple comparison, if in current quarter only 6 weeks have passed so wish to compare this with last quarter with 6 weeks data only.....please help me again.......

       

      Regards

      Rohit

      • v-lili6-msft's avatar
        v-lili6-msft
        Icon for Community Support rankCommunity Support

        hi, Anonymous

        What the form of week in you data, Please share some data sample and expected output. You can upload it to OneDrive and post the link here. Do mask sensitive data before uploading.

         

         

        Best Regards,

        Lin