Forum Discussion
column calculated using values from previous rows from the same column
I need to create an indicator on power bi equal to one used in excel. Everything okay until I try to refer to the previous value of the indicator. Here's a screenshot of how the indicator structure works in excel. How could i do this "G2" reference in power bi?
4 Replies
- Aron_MooreSolution Specialist
Looks like you're after a rolling or cumulative. Try https://www.daxpatterns.com/cumulative-total/ or maybe a SUMX with EARLIER.
Basically, you need to tell the DAX which row so you'll need to use the date or an index column.
- fernandoglrtRegular Visitor
In fact, this indicator is generated daily, based on the yesterday indicator number. This indicator column should calculate different results to each day. I need a dax formula that behave just like the excel formula.
- Aron_MooreSolution Specialist
So maybe something like:
Measure = SUMX('Table', [Rate]* LOOKUPVALUE([Rate2], [Indicator], [Indicator]-1) )