Forum Discussion
Aggregate Data with multiple records
Hi all,
I have produced this table below to help describe what I need help with. But I need to aggregate this data so when I look for the month of November 2019 for the type 201, I need the value of 1.8 (1+0.8 = 1.8 and using "Card" in dashboard) but instead I get the figure of 2.6 (1+0.8+0.8), how do I aggregate when the ID is the same but it's the value I need by the type.
I also need to look at past dates values too, so for Sep - 19 for 201 type the value should be1.5.
| ID | Value | Amount | Type | Dates |
123 | 1 | 4 | 201 | Aug-19 |
| 123 | 1 | 5 | 201 | Sep-19 |
| 123 | 1 | 6 | 205 | Sep19 |
| 123 | 1 | 7 | 201 | Oct-19 |
| 123 | 0.8 | 8 | 201 | Nov-19 |
| 123 | 0.8 | 2 | 201 | Nov-19 |
| 124 | 0.5 | 4 | 201 | Aug-19 |
| 124 | 0.5 | 6 | 201 | Sep-19 |
| 124 | 1 | 2 | 205 | Sep-19 |
| 124 | 1 | 5 | 201 | Oct-19 |
| 124 | 1 | 3 | 201 | Nov-19 |
Any suggestions would be very helpful.
Anonymous ,
Create a measure using dax below:
Result = CALCULATE(SUMX(DISTINCT('Table'[Value]), 'Table'[Value]), ALLSELECTED('Table'))You can also refer to the pbix file.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- parry2kSuper User
Anonymous try this measure
Measure = SUMX ( SUMMARIZE ( 'Table', 'Table'[Type], 'Table'[Value] ), CALCULATE( MAX('Table'[Value] ) ) ) - v-yuta-msftCommunity Support
Anonymous ,
Create a measure using dax below:
Result = CALCULATE(SUMX(DISTINCT('Table'[Value]), 'Table'[Value]), ALLSELECTED('Table'))You can also refer to the pbix file.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi, thank you for replying but unfortunately this didn't work for me and gave me a smaller number then it shoud be.
I need it unique to the individual and sum their value for the month selected.
- parry2kSuper User
Anonymous can you put data in sample excel file and explain what you want. It is not sure which solution you tried and what is not working, you have to provide more details for further help.