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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Distinct filter a column and summing a related column

Hi All,

 

Newbie here, just wondering if a measure is doable here. I want to filter distinct values in one column (in this case names) and sum the values of another column based on the distinct filter. Is this possible using a measure? (told you I was new...:))

Below is just a condensed list as an example. Certain people are required to visit an area a number of times per month. These are tracked in a separate column. I'm wanting to create a card that has a measure of the required visits vs the actual visits. Hope this makes sense. Thank you for any help provided.

 

Names          Visits required

George              7

George              7

Peter                  3

George              3

Mike                  3

Paul                   3

 

 

1 ACCEPTED SOLUTION
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Please @ mention me or I'll miss your reply.  Type @ then select my name from the list.

 

Download sample PBIX

 

You can calculate the Total Visits Required using this measure

 

 

Total Visits Required = SUMX(SUMMARIZE('Table','Table'[Area],'Table'[Names],'Table'[Visits required]),'Table'[Visits required])

 

 

 

and then display that in a card

totvis.png

 

You've worked out the actual visits already?  Do you know how to get both values into a single card?  You can create another something measure like this

 

Total v Actual Visits = "Total Visits : " & [Total Visits Required] & " v Actual Visits :" & [Actual Visits]

 

totvact.png

 

There's an example in my PBIX file above.

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

5 REPLIES 5
Anonymous
Not applicable

Thank you so much @PhilipTreacy !! Works like a charm. I owe you a coffee or something and cna only hope to pay it forward some day.

 

Sorry for not @ you in the first reply. Still learning. Thanks again 🙂

No worries 🙂



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!


PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Please @ mention me or I'll miss your reply.  Type @ then select my name from the list.

 

Download sample PBIX

 

You can calculate the Total Visits Required using this measure

 

 

Total Visits Required = SUMX(SUMMARIZE('Table','Table'[Area],'Table'[Names],'Table'[Visits required]),'Table'[Visits required])

 

 

 

and then display that in a card

totvis.png

 

You've worked out the actual visits already?  Do you know how to get both values into a single card?  You can create another something measure like this

 

Total v Actual Visits = "Total Visits : " & [Total Visits Required] & " v Actual Visits :" & [Actual Visits]

 

totvact.png

 

There's an example in my PBIX file above.

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!


PhilipTreacy
Super User
Super User

Hi @Anonymous 

Sounds doable.  What's the actual result thast you want look like?  The table above just shows Visist Requited.  Where are the number of actual visits?

A card will just show data for 1 person, but that person can be changed by a slicer.  Is that what you want?

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!


Anonymous
Not applicable

Thanks for the quick reply!

I have a slicer which I can select the area. My data is read from a sharepoint list where a salesman eneters their visit to their assigned area. George is supposed to get 7 visits in a month and Steve 3 for a total of 10 for the west. My goal is to get the required visits in a card and the actual visits. The acutal visits I get by countrows. The total for the area is what I can't get my head wrapped around. Maybe I'm going about it the wrong way but the end result is select the west slicer and get the total vs actual. Hope this makes sense. Thx

 

Names          Visits required   Area          Date

George              7                     West         May 4

George              7                     West         May 17

Peter                  3                     East          May 13

Peter                  3                     East          May16

George              3                     East          May16

Mike                  3                     North       May 29

Paul                   3                     North       May29

Steve                 3                     West        May29

 

 

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.