Forum Discussion
Power BI column calculation for Next Day amount
- Anonymous9 years ago
nchambe,
In your scenario, you don’t need to involve Date table, just create the following columns in the Gate Count table.
End Count =var previous= CALCULATE(FIRSTNONBLANK('Gate Count'[OpeningCount],""),FILTER('Gate Count','Gate Count'[Gate]=EARLIER('Gate Count'[Gate])&& 'Gate Count'[Date]>EARLIER('Gate Count'[Date])))
return
IF(ISBLANK(previous),BLANK(), previous)
Change = IF(ISBLANK('Gate Count'[End Count]),BLANK(),'Gate Count'[End Count]-'Gate Count'[OpeningCount])
Regards,
Lydia
nchambe,
In your scenario, you don’t need to involve Date table, just create the following columns in the Gate Count table.
End Count =
var previous= CALCULATE(FIRSTNONBLANK('Gate Count'[OpeningCount],""),FILTER('Gate Count','Gate Count'[Gate]=EARLIER('Gate Count'[Gate])&& 'Gate Count'[Date]>EARLIER('Gate Count'[Date])))
return
IF(ISBLANK(previous),BLANK(), previous)
Change = IF(ISBLANK('Gate Count'[End Count]),BLANK(),'Gate Count'[End Count]-'Gate Count'[OpeningCount])
Regards,
Lydia
Perfect! This worked wonderfully. I appreciate it.