Forum Discussion
My expression return wrong value ( This expression is working fine in Sales Table )
- Anonymous5 years ago
Hi admin11 ,
Here are the steps you can follow:
1. Create measure
Measure 4 = IF( CONTAINSSTRING([Vari_%_NP yang_liu],"- ve%"),1,0)2. Select [Vari_%_NP yang_liu], select Conditional formatting – Background color
3. Enter the Background color interface, select Format by-Rules, Based on field-Measure4, set the conditions
4. Result.
You can downloaded PBIX file from here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi admin11 ,
Sorry, this is my negligence.
This is the Dax function:
Vari_%_NP yang_liu =
Var _1=
IF(
ISBLANK(
DIVIDE([_YTD_NP_SGD]-[_LYTD_NP_SGD], [_LYTD_NP_SGD]))
,1,
DIVIDE([_YTD_NP_SGD]-[_LYTD_NP_SGD],[_LYTD_NP_SGD]))
var _2=
IF(
[_LYTD_NP_SGD] <0 && [_YTD_NP_SGD]>0,ABS(_1),_1)
Return
IF(
[_YTD_NP_SGD] > [_LYTD_NP_SGD] ,FORMAT(_2,"Percent")&" "&"+ ve%" , FORMAT(_2,"Percent")&" "&"- ve%")
Result:
You can downloaded PBIX file from here.
Does this result match your expected data?
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- admin115 years agoMemorable Member
Anonymous
Thank you very much , it work fine now , But i need to highlight those -ve % number back ground red color , i try and i am unable make it. ( Old expression i am able )
As i cannot bring in the measure to Rule.
My PBI file :-
Paul