Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I would like to know the sales values when Top BU is null. I tried the below expression but it is not working.
sum({<[Top BU]={"$(=IsNull([Top BU]))"}>}Sales).
I would like to have your suggestions to correct my expression.
I think Anil's answer is correct. Note the "-" after $. See also
-Rob
Try this:
sum({<[Top BU]={""}>}Sales)
Not Working...
May be using this
=Sum({$-<[Top BU]={'*'}>} Sales)
I think above will give sales where top bu is not null. But I am looking for Sales when Top BU is NULL.
Would you share sample data?
Top BU | Sales |
SEC | 625000 |
- | 1000000 |
EM | 164000 |
- | 262400 |
- | 1000000 |
- | 55200 |
- | 250000 |
API | 115000 |
- | 138000 |
API | 291666.66 |
- | 350000 |
API | 0.83 |
- | 1 |
When I exported, null values are replaced with '-'.
Data:
Load
If(IsNull([Top BU]) or Len(Trim(Replace([Top BU],'-','')))=0, Null(), [Top BU]) as [Top BU],
If(IsNull([Top BU]) or Len(Trim(Replace([Top BU],'-','')))=0, 1,0) as TopBUNullFlag,
Sales
Inline
[
Top BU, Sales
SEC, 625000
-, 1000000
EM, 164000
-, 262400
-, 1000000
-, 55200
-, 250000
API, 115000
-, 138000
API, 291666.66
-, 350000
API, 0.83
-, 1
];
Now use as below
=SUM({<TopBUNullFlag = {1}>}Sales)
If you don't want to change anything in script then use as below..
=SUM({1-<[Top BU] = {'*'}>}Sales)
For me this is working
Sum({<Top -= {"-"}>}[BU Sales]) // - and = is there