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
02welkerm71
Frequent Visitor

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

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 @02welkerm71 ,

 

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.

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

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

Hi @02welkerm71 

 

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/

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 @02welkerm71 ,

 

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