Forum Discussion

RH205's avatar
RH205
Icon for Helper I rankHelper I
11 months ago
Solved

Calculate measure based on startdate from dimension table

hi, hope somebody loves a challenge;)

 

we would like to sum two measures based on company startdate..

1. revenue = CALCULATE([revenue] ,FILTER(ALL('Date'), 'Date'[Date] <= MAX('Date'[Date]))

2. revenue_source_external = CALCULATE ([revenue],revenue[date] = MAX ( revenue[date] ))

 

company table:

company | startdate

a                     1-7-2025

b                     1-1-2020

 

revenue table:

company | date | revenue | revenue_source_external| etc

 

if year/month selected = 2025-07 then we would like to see the following in a matrix, with in the rows the companies and in the columns year-month:

 

sum of company a: revenue_source_external until 1-7-2025 and from 1-7-2025 revenue

+

sum of company b: revenue from 2020 until now

 

we have got it working, but it is not showing totals. I cannot share pbix because of company info. Does anybode have a clue?

 

 

 

 

4 Replies