Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm working on one logic.
As u can see in the above pic,
The third column shows values in orange color.
The logic is
If(DailyReportDim=[Orders Category] and $(vDailyReportValues%) < if(DailyReportDim=[Orders Category], [Threshold Start]) & '%', 'red',
If(DailyReportDim=[Orders Category] and $(vDailyReportValues%) > if(DailyReportDim=[Orders Category], [Threshold End] & '%', 'green', 'orange'
))
But it is giving only orange color . Executing only the else condition.
Can anyone check this out
And come up with a proper logic
The reason you get orange is because neither
DailyReportDim=[Orders Category] and $(vDailyReportValues%) < if(DailyReportDim=[Orders Category], [Threshold Start]) & '%'
nor
DailyReportDim=[Orders Category] and $(vDailyReportValues%) > if(DailyReportDim=[Orders Category], [Threshold End] & '%'
returns true for any row. I suggest you take a look at the different elements of those if statements in order to verify that you get the output from them as you expect.
Also check that the parenthesis are set correctly. I suspect you have at least one misplaced paranthesis.
The reason you're getting orange is because neither of the conditions:
scss
Copy code
DailyReportDim=[Orders Category] and $(vDailyReportValues%) < if(DailyReportDim=[Orders Category], [Threshold Start]) & '%'
nor
css
Copy code
DailyReportDim=[Orders Category] and $(vDailyReportValues%) > if(DailyReportDim=[Orders Category], [Threshold End] & '%'
returns true for any row. I recommend examining each element of these if statements to ensure they produce the expected output.
Additionally, double-check that the parentheses are correctly positioned. It's possible you have at least one misplaced parenthesis.
I corrected that parenthesis.
Actual requirement is
If the column(DailyReportValues%) values are
Within threshold start and threshold end
It must show orange color
If it is below threshold start-red color
Above threshold end-green color.
Can we write this logic in any other way than if condition
I got the solution
Anyway thanks.