cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ian_abq
Regular Visitor

SUM FILTERED DATA WITH DAX

Can you help me with this DAX calculation?

I have a table with 3 collums that I want to sum using filters.

Captura de tela 2021-11-05 233931.jpg

In this case I want to show that IDA (809147) have "18" Fractions in the Course "5".

Therefore, I want to agrupate IDA by Course, sum the fractions of each course and then show only the hightest course of each IDA.

 

I'm leaving a pbix file below.

file 

Thanks

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @ian_abq 

 

Download your PBIX file with the below added.

 

If I understand correctly, you can do what you want by having a table with the IDA, Max of Course and then using a measure in the 3rd column which is

Max Frac = CALCULATE(SUM('data'[Fractions]), FILTER('data', 'data'[IDA] = SELECTEDVALUE(data[IDA]) && 'data'[Course] = MAX('data'[Course])))

 

maxfrac.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

1 REPLY 1
PhilipTreacy
Super User
Super User

Hi @ian_abq 

 

Download your PBIX file with the below added.

 

If I understand correctly, you can do what you want by having a table with the IDA, Max of Course and then using a measure in the 3rd column which is

Max Frac = CALCULATE(SUM('data'[Fractions]), FILTER('data', 'data'[IDA] = SELECTEDVALUE(data[IDA]) && 'data'[Course] = MAX('data'[Course])))

 

maxfrac.png

 

Regards

 

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Helpful resources

Announcements
November 2022 Update

Check it Out!

Click here to read more about the November 2022 updates!

Power BI Dev Camp Session 27

Ted's Dev Camp

This session walks through creating a new Azure AD B2C tenant and configuring it with user flows and custom policies.

Health and Life Sciences Power BI User Group

Health and Life Sciences Power BI User Group

Power BI specialists at Microsoft have created a community user group where customers in the provider, payor, pharma, health solutions, and life science industries can collaborate.