Forum Discussion
Conditional Sum
- 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.
Can you repost your data as text please (not a picture)? and can you show what the desired result is
Hi HotChilli,
Here is the data format in the tabular format. In short, I want to create a new curve which will be sum of the curve A and Curve B only. To give one example, on 25 July, I want to add the values of A and B which are 10 and 13. Similary, I want to do it for all the dates.
To be more concise, a new curve is required which is daily sum of the Curves A and B.
P.S: Not the objective of this post: Later on, I want to divide the value of this new curve by C and generate another curve which is ultimate objective.
| Name | Date | Value | Conditional Sum |
| A | 25-Jul-22 | 10 | |
| B | 25-Jul-22 | 13 | |
| C | 25-Jul-22 | 16 | |
| A | 26-Jul-22 | 19 | |
| B | 26-Jul-22 | 22 | |
| C | 26-Jul-22 | 25 | |
| A | 27-Jul-22 | 28 | |
| B | 27-Jul-22 | 31 | |
| C | 27-Jul-22 | 34 |