Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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.

 

IDValueAmountTypeDates

123

14201Aug-19
12315201Sep-19
12316205Sep19
12317201Oct-19
1230.88201Nov-19
1230.82201Nov-19
1240.54201Aug-19
1240.56201Sep-19
12412205

Sep-19

12415201

Oct-19

12413201

Nov-19

 

Any suggestions would be very helpful.

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create a measure using dax below:

Result = CALCULATE(SUMX(DISTINCT('Table'[Value]), 'Table'[Value]), ALLSELECTED('Table'))

Capture.PNG 

 

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.

 

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

Create a measure using dax below:

Result = CALCULATE(SUMX(DISTINCT('Table'[Value]), 'Table'[Value]), ALLSELECTED('Table'))

Capture.PNG 

 

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.

 

Anonymous
Not 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.

@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.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

parry2k
Super User
Super User

@Anonymous try this measure

 

Measure = 
SUMX ( 
    SUMMARIZE ( 'Table', 'Table'[Type], 'Table'[Value] ), 
    CALCULATE( MAX('Table'[Value] ) ) 
)

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.