Forum Discussion
VTork
3 years agoFrequent Visitor
Calculate SUM and filter by dates (between different tables)
Hi - I was wondering if someone could help me with this. I got 3 tables: F1, F2 and F3. Each of them got a date column and a value column. I'd like to create a measure that sum all the values in F1 t...
Greg_Deckler
Community Champion
3 years agoVTork Try:
2023 Measure =
VAR __Date = DATE(2023,1,1)
VAR __F1 = SUMX(FILTER(ALL('F1'),[Date] = __Date),[Value])
VAR __F2 = SUMX(FILTER(ALL('F2'),[Date] = __Date),[Value])
VAR __F3 = SUMX(FILTER(ALL('F3'),[Date] = __Date),[Value])
VAR __Result = __F1 + __F2 + __F3
RETURN
__ResultVTork
3 years agoFrequent Visitor
Hi Greg_Deckler - thank you for getting back to me so quickly!
Sorry I'm still quite new to Power Bi, tried to follow your guidance but didnt get it quite right....
2023 Measure =
VAR __Date = DATE(2023,1,1)
VAR __F1 = SUMX(FILTER(ALL(F1[Y1].[Date] = __Date),F1[Y1 Value]),
VAR __F2 = SUMX(FILTER(ALL(F2[Y2].[Date] = __Date),F2[Y2 Value]),
VAR __F3 = SUMX(FILTER(ALL(F3[Y3].[Date] = __Date),F3[Y3 Value]),
VAR __Result = __F1 + __F2 + __F3
RETURN
__Result ))
Any advice here? 😇
Any advice here? 😇