Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Running Total-QTD

Hi All,

 

I'm looking to create a running total measure which fits the visual on the screenshot.
For the Targets in my visual I've used the below measure and it is giving me correct value but when I'm trying same for SQO QTD then I's not working and giving me numbers only for that week end number whereas I want a running total for that as well.

 

Need help here as I'm stuck on this.

 

Measure Used for Targets which is working:

 

Cumulative_SQO_Targets =
VAR MaxDate = MAX(F_SQO_FLM_TARGETS[FULL_DATE])
RETURN
    CALCULATE(
        SUM(F_SQO_FLM_TARGETS[SQO_TARGET_DAILY]),
        FILTER(
            ALLSELECTED(F_SQO_FLM_TARGETS),
            F_SQO_FLM_TARGETS[FULL_DATE] <= MaxDate
        )
    )

 

 

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    If I'm using the below measure it is giving me correct values but its giving me data till last week only and not till current date.

    I'm not sure what I'm missing here.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, Anonymous 

       

      Please review the attachment, is this the result you were expecting?

      Measure = Var _Today=TODAY()
      Var _SUM1=CALCULATE(SUM(F_SQO_FLM_TARGETS[SQO_ACTUALS_DAILY]),FILTER(ALL(F_SQO_FLM_TARGETS[Last Day of Week_F]),
      [Last Day of Week_F]<=MAX(F_SQO_FLM_TARGETS[Last Day of Week_F])))
      Var _SUM2=CALCULATE(SUM(F_SQO_FLM_TARGETS[SQO_ACTUALS_DAILY]),FILTER(ALL(F_SQO_FLM_TARGETS),[Date]<=_Today))
      RETURN
      IF(_Today>=MAX(F_SQO_FLM_TARGETS[Last Day of Week_F]),_SUM1,_SUM2)

      If this fails to solve your problem, please provide some of the sample data and the desired output.

       

      Best Regards,

      Community Support Team _Charlotte

      If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Anonymous No, its not giving the expected result. Its going till the last week which should not be the case as we're still not there.

         

        You can find the sample file on the below location with details.

        https://drive.google.com/file/d/1VxioEEHSw9RqMkicXCGmUW8ehMExY4Jg/view?usp=sharing

        I have the week end flag available in my date table as well as main table but it is somehow not giving correct data thats why I thought to create a measure for running total but the problem now is that I want to show data as QTD but not sure how it will be possible on the weekly grain.