Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi All,
I have a table below which shows actuals against targets and a 3rd column which shows the variance.
I want the variance to exclude anything that is negative -100% but cant seem to get it in my if formula.
Any ideas on what I could do ?
I have tried the following to deal with blanks, then i nested another if to say if it = -100 then display blank/0 etc but it has no impact. Is this something I should have dealt with at the divide stage between actual and target possibly ?
Any help or advice - much appreciated 🙂
I am also looking for ways, but turn out it is easier to change the number formact to [<1]0.0%;""
Hi @Jitmondo , Then try this:
Result = var Target_Variance% = IF(ISBLANK( Sales Teams'[Target Variance %]),"-",'Sales Teams'[Target Variance %])
return
If(Target_Variance% =-100, 0,Target_Variance%)
OR
Result = var Target_Variance% = IF(ISBLANK( Sales Teams'[Target Variance %]),"-",'Sales Teams'[Target Variance %])
return
If(Target_Variance% <>-100,Target_Variance%,0)
Mark this as a solution & hit the thumbs up if it helps you. Thanks.
Still no luck I am afraid, I feel like they should work to be honest but will look at the actual target variance measure to see if I can make amendments there ...
Thanks @truptis I tried this but it makes all negatives 0
I only want to -100 to be zero or blank as it means either actual or target is empty...
I think they were close:
Try
Result = var Target_Variance% = IF(ISBLANK( Sales Teams'[Target Variance %]),"-",'Sales Teams'[Target Variance %])
return
If(Target_Variance% =-1, 0,Target_Variance%)
Power BI treats percentages as decimals with 100% equalling 1. So if you were looking to only ignore negative 100%. Tell it to treat -1 as 0, otherwise bring up anything else.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
76 | |
74 | |
56 | |
45 |
User | Count |
---|---|
117 | |
105 | |
77 | |
66 | |
64 |