Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello colleagues
I have a question on the condition in the expression diagrams.
There are fields in the table:
FILIALS
SUM_PLAN
SUM_FACT
I need to count those branches in which sales = 0, and plans> 0
Is it possible to include such a condition in the Set Analysis?
May be this?
Count(distinct {<SUM_FACT={'>0'}, SUM_PLAN={'0'}>}FILIAL)
Which fields have sales, plan, branch info? Could you be a bit more illustrative about your field details and may be also about the requirement?
The dataset is look like that
FILIAL / BRANCH | SUM_PLAN | SUM_FACT |
branch 1 | 639 | 177 |
branch 2 | 761 | 347 |
branch 3 | 563 | 457 |
branch 4 | 179 | 0 |
branch 5 | 506 | 166 |
branch 6 | 829 | 0 |
branch 7 | 583 | 749 |
branch 8 | 0 | 0 |
branch 9 | 778 | 327 |
I want create expression which return quantity of branches where FACT = 0 and PLAN > 0
In my case it must return 2
try this script
A:
LOAD *
Where
SUM_PLAN>'0' and SUM_FACT='0' ;
LOAD * INLINE [
FILIAL, SUM_PLAN, SUM_FACT
branch1, 639, 177
branch2, 761, 347
branch3, 563, 457
branch4, 179, 0
branch5, 506, 166
branch6, 829, 0
branch7, 583, 749
branch8, 0, 0
branch9, 778, 327
];
Thank you Chanty 4u, but I want create it in diagramm, if it possible.
Diagram means?
May be this?
Count(distinct {<SUM_FACT={'>0'}, SUM_PLAN={'0'}>}FILIAL)
Yes, sorry...
Not tested
try this
A:
//LOAD *
//Where
//SUM_PLAN>'0' and SUM_FACT='0' ;
LOAD * INLINE [
FILIAL, SUM_PLAN, SUM_FACT
branch1, 639, 177
branch2, 761, 347
branch3, 563, 457
branch4, 179, 0
branch5, 506, 166
branch6, 829, 0
branch7, 583, 749
branch8, 0, 0
branch9, 778, 327
];
Result:
LOAD *
,
if(SUM_PLAN='0',SUM_FACT>'0' ) as flag
Resident A;
use flag in chart measure
Yes, it work! Thank you!