Forum Discussion

erg2494's avatar
erg2494
Frequent Visitor
4 years ago
Solved

How to get running total using a Dynamic Measure

Hello,

 

I would like to create a running total but use a measure as a starting point. This measure is updated every day. PLease see example below. Is this possible? 

 

For example:

 

starting_measure = 10

(this changes each day, so I would like for the running total for TODAY to reflect that) 

 

Date | col A | col B | TOTAL Daily Movement | Running Totals

3/25      1         2               3                                13

3/26       2       2                4                                17

3/27       1        1               2                                19

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi erg2494 , 

    Please refer to my pbix file to see if it helps you.

    Create a measure.

     

    Measure = CALCULATE([starting_measure]+SUM('Table'[Total Daily Movement]),FILTER(ALL('Table'),'Table'[date]<=SELECTEDVALUE('Table'[date])))

     

    If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

     

    Best Regards

    Community Support Team _ Polly

     

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

     

     

5 Replies

  • Don't use the term "measure" - it has a different meaning in Power BI.

     

    Where does your dynamic value come from? is your data source in import mode or in direct query mode?

    • erg2494's avatar
      erg2494
      Frequent Visitor

      the dynamic value is the sum of other columns from different datasets. I don't want to include these columns into my current matrix. I simply want to use that sum (measure I created on the visual page) as the starting point for the running total. 

       

      my data source is in import mode. 

       

      hope that helps and isn't too confusing. I'm a new Power BI user. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi erg2494 , 

    Please refer to my pbix file to see if it helps you.

    Create a measure.

     

    Measure = CALCULATE([starting_measure]+SUM('Table'[Total Daily Movement]),FILTER(ALL('Table'),'Table'[date]<=SELECTEDVALUE('Table'[date])))

     

    If I have misunderstood your meaning, please provide your pbix file without privacy information and desired output.

     

    Best Regards

    Community Support Team _ Polly

     

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

     

     

    • erg2494's avatar
      erg2494
      Frequent Visitor

      thank you so much. this worked for me.