Forum Discussion
ashraf_K
3 years agoFrequent Visitor
Running Difference per day and name
Below is a sample data that is being used. The requirement is to calculate the remaining for each row by substracting it from the previous line. Basically for 10 Oct it is easily calculated,...
- 3 years ago
Then, something like on the screenshot below. The table visual allows sorting by multiple columns if you hold SHIFT key.
In plain text:
Remaining = VAR CurDate = [Purchase date] VAR CurVessel = [Vessel Name] VAR _tbl = FILTER ( Data, [Vessel Name] = CurVessel && [Purchase date] <= CurDate ) RETURN SUMX ( FILTER ( Data, [Vessel Name] = CurVessel ) , [Required] ) - SUMX ( _tbl, [Purchased] )Best Regards,
Alexander
barritown
Solution Sage
3 years agoThen, something like on the screenshot below. The table visual allows sorting by multiple columns if you hold SHIFT key.
In plain text:
Remaining =
VAR CurDate = [Purchase date]
VAR CurVessel = [Vessel Name]
VAR _tbl = FILTER ( Data, [Vessel Name] = CurVessel && [Purchase date] <= CurDate )
RETURN SUMX ( FILTER ( Data, [Vessel Name] = CurVessel ) , [Required] ) - SUMX ( _tbl, [Purchased] )Best Regards,
Alexander
ashraf_K
3 years agoFrequent Visitor
Yes, that does solve the issues.
Thank you!