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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
hworrall
Frequent Visitor

Measure Total Not Correct Using MIN Function

I am using the MIN fuction to find the smaller of two numbers.  In my table, it shows a blank as the result for one client, but the total includes the number that is actually the higher of the two.  

 

Here is my calculation:  

WIPOver90Days_2 = MIN(CALCULATE(sum(WIP[Wfee]),filter((WIP),(WIP[Windicator]="P"))),CALCULATE(WIP[WipExpWindicator is W]+WIP[WipFeeWindicator is W],filter((WIP),WIP[WIPAgeDays] > 90)))
 
Here is my result.  The $500 is the value of the first part of the MIN calculation (where the Windicator = P).  There is no data for the second calculate option.
 
Cltnum WIPOver90Days_2
60482.120  
60482.102 0
60482.106 0
60482.109 0
60482.105  
60482.107  
60482.500  
   
Total:   $500

 

I am spinning my wheels with this one!  Any help is appreciated.

1 ACCEPTED SOLUTION

Hi @hworrall ,

 

Would you please try the following measure:

 

WIPOver90Days_2 FOR VISUAL =
IF (
    HASONEVALUE ( WIP[WEng] ),
    [WIPOver90Days_2],
    MINX ( SUMMARIZE ( WIP, WIP[Cltnum],WIP[WEng], "_MIN", [WIPOver90Days_2] ), [_MIN] )
)

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

 

Best Regards,

Dedmon Dai

 

View solution in original post

5 REPLIES 5
v-deddai1-msft
Community Support
Community Support

Hi @hworrall,

 

What did you want for total value? If you want to show smallest value in [WIPOver90Days_2], please refer to the measure :

 

WIPOver90Days_2 FOR VISUAL =
IF (
    HASONEVALUE ( WIP[Cltnum] ),
    [WIPOver90Days_2],
    MINX ( SUMMARIZE ( WIP, WIP[Cltnum],WIP[WEng], "_MIN", [WIPOver90Days_2] ), [_MIN] )
)

 

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

 

Best Regards,

Dedmon Dai

Unfortunately this is giving me the same result.  The resulting table doesn't show the $500, but does include it in the sum.  Here is the data if it is helpful.

 

WCltNumWEngWfeeWindicator WCltNumWEngWfeeWindicator
60482102 W 604821020P
60482105340W 60482105 P
60482106 W 604821060P
604821073966.9W 60482107 P
60482109 W 604821090P
60482120 W 60482120500P
6048250019.34W 60482500 P
 

And here is the resulting table:

CltnumWEngWIPOver90Days_2WIPOver90Days_2 FOR VISUAL
60482120  
6048210200
6048210600
6048210900
60482105  
60482107  
60482500  
    
Total 500500

 

The total should be 0.

 

Hi @hworrall ,

 

I have edited my original reply. Please try again.

 

Best Regards,

Dedmon Dai

Somehow it is still giving the $500 as the total even though the results in the table are correct.  I am going to go back and try to work on this from scratch and see if I can come up with something.

 

Thanks for your help!

Hi @hworrall ,

 

Would you please try the following measure:

 

WIPOver90Days_2 FOR VISUAL =
IF (
    HASONEVALUE ( WIP[WEng] ),
    [WIPOver90Days_2],
    MINX ( SUMMARIZE ( WIP, WIP[Cltnum],WIP[WEng], "_MIN", [WIPOver90Days_2] ), [_MIN] )
)

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

 

Best Regards,

Dedmon Dai

 

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.