Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Guys,
I want to name category by following way,
IF reason code = Unexplained Shrinkage or Unexplained Overage or Previous Adjustment Error or Label/Point of Sale Error and “Tracking #” = Black then it is ACC
IF reason code = “Unexplained Shrinkage” or “Unexplained Overage” or “Previous Adjustment Error” or “Label/Point of Sale Error” and “Tracking” # <> Black then it is Hero
Please see below, it not working the way I want it. Can any please tell me why is that?
Reason = IF(AdjustmentHistory[Reason Code]="Unexplained Shrinkage" || AdjustmentHistory[Reason Code]="Previous Adjustment Error" || AdjustmentHistory[Reason Code]="Label/Point of Sale Error" && AdjustmentHistory[Tracking #] = BLANK(), "ACC", IF(AdjustmentHistory[Reason Code]="Unexplained Shrinkage" || AdjustmentHistory[Reason Code]="Previous Adjustment Error" || AdjustmentHistory[Reason Code]="Label/Point of Sale Error" && AdjustmentHistory[Tracking #] <> BLANK(),"Hero","Others"))
Thank you
Solved! Go to Solution.
HI @Anonymous
You often get unexpected results when you mix OR and AND operators in the same expression. e.g.
A=1 or B=2 or C=3 and D=4
is not the same as
A=1 or B=2 or (C=3 and D=4)
Note the use of the parenthesis to control the boolean logic. I suspect some well placed brackets may help you.
HI @Anonymous
You often get unexpected results when you mix OR and AND operators in the same expression. e.g.
A=1 or B=2 or C=3 and D=4
is not the same as
A=1 or B=2 or (C=3 and D=4)
Note the use of the parenthesis to control the boolean logic. I suspect some well placed brackets may help you.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |