Forum Discussion
Alice_C
1 year agoFrequent Visitor
Problem with inactive relationships
Hi all, Here is my data model : I am trying to calculate the sum of Revenue per BusinessId (Business Table) with the folowing conditions : - I have a slicer where I can select the DayId...
- 11 months ago
Hi,
I finally found the answer to my problem :VAR SelectedDay = MAX ( Calendar[DayId] )
RETURN
CALCULATE(
SUM(Sales[Revenue] ),
FILTER(
Business,
Business[StateId] in values (Geo[StateId])
),
Sales[CityId] IN calculatetable(VALUES(Geo[CityId]), FILTER(
ALL(Geo),
Geo[ClosureDate]>SelectedDay
))
)
Alice_C
11 months agoFrequent Visitor
Hi,
I finally found the answer to my problem :
VAR SelectedDay = MAX ( Calendar[DayId] )
RETURN
CALCULATE(
SUM(Sales[Revenue] ),
FILTER(
Business,
Business[StateId] in values (Geo[StateId])
),
Sales[CityId] IN calculatetable(VALUES(Geo[CityId]), FILTER(
ALL(Geo),
Geo[ClosureDate]>SelectedDay
))
)