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! Request now

Reply
Aucesar
Helper III
Helper III

IF measure not working as expcted

Hi, I´m doing this measure:

IF ([WorkedDays1+2] <=[WorkedDaysTotal],[WorkedDays1+2], IF([WorkedDays1+2] >[WorkedDaysTotal],[WorkedDaysTotal],"0"))

 

What I´m expecting is , set a max value based on WorkedDaysTotal, no one can work more than WorkedDaysTotal. If "true" use WorkedDaysTotal (which changes every month)

 

If False keep the actual value.

 

After apply this measure I´n not getting th desired output as it´s filtering by Names1 only as below:

Any suggestion?

Aucesar_0-1692642872472.png

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Aucesar ,

 

I suggest you to try code as below to update [FusoesMes] measure.

FusoesMes = CALCULATE(DISTINCTCOUNT ( Refugo[Número Fusão] ),REMOVEFILTERS('Refugo-Moldadores'[NomeMoldadores]))

Result is as below.

vrzhoumsft_0-1692782434192.png

Best Regards,
Rico Zhou

 

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

 

View solution in original post

4 REPLIES 4
Aucesar
Helper III
Helper III

Hi @Anonymous and @parry2k thansk for the help, problem solved!

parry2k
Super User
Super User

@Aucesar I think it will be easier if you provide raw data and the information about these measures, also how your data model looks like to provide an effective solution.



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Sure, this is the link to pbi file https://1drv.ms/u/s!AktM4_8VYySOiJMiw0k4kBIC10ltNA?e=h8Nnq6 , also the main data comes from "Refugo" colunms (Ajudante,Moldador,NumeroFusao), give a try using the main data instead calculated table if you want.

Anonymous
Not applicable

Hi @Aucesar ,

 

I suggest you to try code as below to update [FusoesMes] measure.

FusoesMes = CALCULATE(DISTINCTCOUNT ( Refugo[Número Fusão] ),REMOVEFILTERS('Refugo-Moldadores'[NomeMoldadores]))

Result is as below.

vrzhoumsft_0-1692782434192.png

Best Regards,
Rico Zhou

 

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

 

Helpful resources

Announcements
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