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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Limit value to sum of other value

Hi all,

 

In the Visual below, I want to limit the "Sum of MI20 Counts" to the value that is in the "Sum of # Counts".  This way the last column will never go over 100%.  What would I use for this?

 

Power BI.PNG

1 ACCEPTED SOLUTION

Hi,

Try this measure

=IF(count(MI20[Plant-Matl-Stor Loc])>SUM(Data[# Counts]),SUM(Data[# Counts]),count(MI20[Plant-Matl-Stor Loc]))

Replace Data[# Counts] with the actual Table and column name.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

8 REPLIES 8
RobbeVL
Impactful Individual
Impactful Individual

Could you give some more info on the actual underlaying data? 

Also your required result...

Anonymous
Not applicable

The "sum of # counts" column is a listing of how many times an item should be counted.  The "Sum of MI20 Counts" is how many times the item has been counted.  I don't want any item that has been counted more than it should be counted to affect the overall progress percentage.  So if an item should be counted 3 times and has been counted 5 times, I want it to display that it has been counted 3 times.

Hi @Anonymous ,

 

What's the detailed formula in your "sum of # counts" and "Sum of MI20 Counts"? we need to know the logic in your data. it's preferred to share your dummy pbix or simple worksheet here.

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Additionally, "Sum of MI20 counts" is calculated as:

Sum of MI20 Counts = CALCULATE(count(MI20[Plant-Matl-Stor Loc]))

Hi @Anonymous 

 

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution. if not, please share more details about your question, we'd like to provide further support. thanks!

 

If you've fixed by your own, it would be much appreciated if you can share your solution here. 

 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Hi,

Try this measure

=IF(count(MI20[Plant-Matl-Stor Loc])>SUM(Data[# Counts]),SUM(Data[# Counts]),count(MI20[Plant-Matl-Stor Loc]))

Replace Data[# Counts] with the actual Table and column name.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Apologies, new to this.  "sum of # counts" is just pulling a value straight from the data sheet that is unique to each "Plant-Matl-Stor Loc" (there is only one of each in the table it is pulling from).  No calculation.  "sum of MI20 Counts" is pulling from a separate table that has multiple occurences of "Plant-Matl-Stor Loc" depending on the amount of times counted.  This column uses the count of these occurances and sums them as a value.

 

I've attached the link to my online PowerBI worksheet.

 

https://app.powerbi.com/groups/me/reports/43d61311-4308-48fb-beec-1a0320339fa9/ReportSectionb54c904a...

Hi @Anonymous ,

 

We don't have the accessibility to view the report. could you please upload your dummy pbix to Google drive/Onedrive/dropbox to generate the sharelink to us?

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors