We got (thanks to @powerbideveloper a measure which calculates cumulative sales in table like below
The measure is: Sales_Cumulative = VAR LastSalesHour = CALCULATE ( MAX ( Sales[Dateto] ), ALL ( Sales ) ) RETURN IF (SELECTEDVALUE ( Sales[Dateto] ) > LastSalesHour, BLANK (), CALCULATE ([SalesDaily], FILTER (ALLSELECTED ( Dim15mPeriods ), Dim15mPeriods[Dateto] <= MAX ( Dim15mPeriods[Dateto] ) ) ) )
We have also a second need.
If we have two lines in the same table, but we have more than 1 Store, we need another measure that will be a sum of cumulative sales for this “datefrom-dateto” period for a day, so it will be the same value in both rows
also, sum of cumulative sales_exceptSelected must be the same sum, but except value of Sales_Cumulative in current row.
Date / Weekday / StoreName / Datefrom / Dateto / Sales / Sales_Cumulative / Sum_Sales_Cumulative / Sum_Sales_Cumulative_ExceptSelected
01.04.2019 / Monday / Store1 / 11:15 / 11:30 / 68.10 / 71.90 / 351.90 / 280.00
01.04.2019 / Monday / Store2 / 11:15 / 11:30 / 100.00 / 200.00 / 351.90 / 151.90
01.04.2019 / Monday / Store3 / 11:15 / 11:30 / 50.00 / 80.00 / 351.90 / 271.90
how to create Sum_Sales_Cumulative and Sum_Sales_Cumulative_ExceptSelected measures?