Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to use Set Analysis for a not equal to value.
=Sum({$<[Flag]-={'x'}>}[Amount])
This is not working properly. When I change -= to just = , I get the correct amount for the ones that should be equal to x. How should I write this to sum the Amount where the Flag is not equal to x?
I think that is the issue. How do I account for NULL values then?
Maybe This.
=sum({($ -<Flag={'*'}>) Sales)
Or define something for NULL in Script
If(Flag<>'X', Y) as Flag
and use Set Analysis in equation
That doesn't work. If I cannot determine a way to do it within Set Analysis, I will just add something to the script that gives it a value when it is not 'x'.
That does not work, most likely because of the NULL values as well.
Hi Cliff, I prefer to do the exclusion in two steps to manage null values better:
=Sum(Amount)-Sum({$<[Flag]={'x'}>}[Amount])
Regards!!
If want to get solution quickly, try to share sample data or else Qvw.
-Nagarjun
If the rows where Flag is a field have some sort of unique ID, you could try with an expression search. For example:
=Sum({<SalesOrderID = {"=Flag <> 'x'"}>} Amount)
Hi Cliff,
Can you try below expression. I just removed the quotes in the value.
=Sum({$<[Flag]-={x}>}[Amount])
Hope this time it should work.
Perhaps this
=Sum({$<flag -= {'x'}>} amount)
I've written all lower letters
The better Sample Data. Why this is not working? Have you get any typo error from Expression
Load * Inline [
flag, amount
x, 10
y, 20
z, 30
];
For me this expression is working. Would you provide data which you expecting