Forum Discussion
Eyal
Helper II
8 years agoMeasure to calculate based on previous data point.
Hello, I need to multiply to parameters. One of which is sampled every 3 days and I need to use the previse sampled point for today calculation until a new sample point arrive, (See screen clip). ...
- 8 years ago
Hi Eyal
Following DAX formula will do the job
Product Of Day Parameters= VAR PreviousSample = IF ( ISBLANK ( Table1[Sample] ), CALCULATE ( LASTNONBLANK ( Table1[Sample], Table1[Sample] ), FILTER ( Table1, Table1[Day] < EARLIER ( Table1[Day] ) ) ), Table1[Sample] ) RETURN Table1[PARA2] * PreviousSample
Zubair_Muhammad
Community Champion
8 years agoHi Eyal
Following DAX formula will do the job
Product Of Day Parameters=
VAR PreviousSample =
IF (
ISBLANK ( Table1[Sample] ),
CALCULATE (
LASTNONBLANK ( Table1[Sample], Table1[Sample] ),
FILTER ( Table1, Table1[Day] < EARLIER ( Table1[Day] ) )
),
Table1[Sample]
)
RETURN
Table1[PARA2] * PreviousSampleEyal
Helper II
8 years agoHi Zubair_Muhammad
thanks a lot work like a charm.
Eyal