Forum Discussion
shubh25
7 years agoHelper I
Cumulative sum by dates (Even the missing dates)
Hi, I am using measure to calculate profit across the dates. This is the data that I am using. Date, Revenue on that date and Cumulative revenue. Cumulative value even when I choose a part...
- 7 years ago
Hi shubh25 ,
One sample for your reference, please check the following steps as below.
1. Create a calendar table as below and make it related to the fact table.
CALENDAR = CALENDAR(DATE(2019,01,01),DATE(2019,01,31))
2. To create a measure.
Measure = CALCULATE(SUM('Table'[Revenue]),FILTER(ALL('CALENDAR'),'CALENDAR'[Date]<=MAX('CALENDAR'[Date])))
v-frfei-msft
7 years agoCommunity Support
Hi shubh25 ,
One sample for your reference, please check the following steps as below.
1. Create a calendar table as below and make it related to the fact table.
CALENDAR = CALENDAR(DATE(2019,01,01),DATE(2019,01,31))
2. To create a measure.
Measure = CALCULATE(SUM('Table'[Revenue]),FILTER(ALL('CALENDAR'),'CALENDAR'[Date]<=MAX('CALENDAR'[Date])))
- shubh257 years agoHelper I
I am trying to do that already. However, rest of the filters are in another table i.e., "Finacials". Is there a way that I can use all and selectedvalue on columns from different tables.
i.e., DATES from CALENDER & SOURCENAME from FINANCIALS.
The DAX expression I am currently using-Profit over period =CALCULATE ([Revenue],FILTER (ALL ( Financials ),Financials[TxnDate] <= MAX ( Financials[TxnDate] )&& Financials[Source.Name] = SELECTEDVALUE ( Financials[Source.Name] )))