Forum Discussion
Anonymous
4 years agoNot applicable
Conditional Sum
Hi, I want to get sum of some rows from a given data set. I can better explain my query from the following example. In the image attached, I have a dataset containing three names A, B, and ...
- 4 years ago
Hi, Anonymous ;
Try to create those measures.
A = CALCULATE(SUM('Table'[Value]),'Table'[Name]="A")B = CALCULATE(SUM('Table'[Value]),'Table'[Name]="B")C = CALCULATE(SUM('Table'[Value]),'Table'[Name]="C")D = calculate(Sum('Table'[Value]), filter(allselected('Table'), [Date] = max('Table'[Date]) && [Name] in {"A", "B"} ) )ratdio = [D]/[C]The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
4 years agoAnonymous , You can create a measure like
calculate(Sum(Table[Value]), filter(allselected(Table), Table[Date] = max(Table[Date]) && Table[Name] in {"A", "B"} ) )
Anonymous
4 years agoNot applicable
Thanks Amitchandak.
I have tried a few time to implement the suggested solution on my actual dataset. However, I am getting only the blank values in the column.