Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have measure like the one below, formatted as Currency
[PAIN / GAIN ALL] = CALCULATE([PAIN / GAIN],ALL(dimpartner))
[PAIN / GAIN] = CALCULATE(([Current Target]-[Current AFC]),FILTER(dimpartner,dimpartner[Partner Type]<>"Tier 2"))I am trying to add a SWITCH ( TRUE () logic to achieve the result, However I am getting below shown error.
I have below items in my table named 'dimpartner'[Partner] column in DAX Studio it shows below values in partner column
EVALUATE(VALUES(dimpartner[Partner]))Here is the error Power BI desktop throws and here is the Measure I have written
Alliance Members Pain / Gain Share with Switch 2 =
SWITCH (
TRUE (),
[PAIN / GAIN ALL] > 6000000
&& VALUES ( dimpartner[Partner] ) = "NetworkRail", [First 6M Gain to Network Rail],
[PAIN / GAIN ALL] > 6000000
&& VALUES ( dimpartner[Partner] ) = "Murphys", [Percentage of Works Value],
0
)
Hi @smjzahid ,
To give the correct answer other info is also required but in the meantime you can try below code:-
Alliance Members Pain / Gain Share with Switch 2 =
SWITCH (
TRUE (),
[PAIN / GAIN ALL] > 6000000
&& MAX ( dimpartner[Partner] ) = "NetworkRail", [First 6M Gain to Network Rail],
[PAIN / GAIN ALL] > 6000000
&& MAX ( dimpartner[Partner] ) = "Murphys", [Percentage of Works Value],
0
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.