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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
rm82
New Member

Limit Formula to Maximum Value

Hello everyone,

 

I am having an issue with a calculated field. 

 

We have a row that may sum up several numbers. I entered Internal time today for the following amounts:

 

2

9

5

5

 

I have a formula created that looks like this.

Internal = CALCULATE(min(6,sum(Time_Entry[Hours_Actual])), v_rpt_Time[WORK_TYPE] = "Internal")

 

This formula works except it does not apply to the sum of the lines, but each individual line. So it will exclude the line with "9", but all the other lines are under "6" so it add them up to a total of "12".

I need it to have formula Sum and then apply the MIN. Any help?

 

Thanks!

rm82

 

 

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @rm82,

 


Can you mark the proper answer as a solution please?

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @rm82,

 

Seems you need to remove the filter of that column. Try something like below. If it doesn't work, please provide a more complete sample.

Internal =
CALCULATE (
    MIN ( 6, SUM ( Time_Entry[Hours_Actual] ) ),
    v_rpt_Time[WORK_TYPE] = "Internal",
    ALL ( Time_Entry )
)

Best Regards,

Dale

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.