Forum Discussion
ARob198
Helper IV
6 years agoFilter sum by another table
I have a problem that seems like it should be easy, but I can't seem to get the formula right. I have two tables. One has values by asset by date, the second defines the type of asset. I need ...
- 6 years ago
hi ARob198
Do you mean that you do a filter in visual level filter and then use the measure result in another Measure?
If so, you need to add the same filter into that visual too, the measure result in based on it row context and filter context.
otherwise, you could define it in the measure like this
Measure =CALCULATE( SUM('Table 1'[Value]),'Table 2'[Type]="Cash")But this will not interaction by slicer.
Regards,
Lin
Anonymous
6 years agoNot applicable
Is this a running total? If so, you can use the Quick Measure in PowerBI. https://powerbi.microsoft.com/en-us/blog/quick-measures-preview/
If it is not a running total, you should just use a measure with SUM([value]).
You probably need a date dimension too though if this is accounting data.
- ARob1986 years ago
Helper IV
I am not really sure what you mean. I am trying the formula below. I am not getting an error, but the end result is blank. What do you suggest? Thank you for your help.Calculate(SUM('Table1'[VALUE]), filter(ALL(Table2), (Table2[TYPE] = "Cash"&& 'Table1'[NAME DETAIL] = 'Table2'[NAME])))