Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a problem with an expression in set analysis. I have 3 Dimension (Customer, Product A, Product B) and a Value . e.g.
Customer, Product A, Product B
M, ,5
P,5,10
T, ,
Now I need an expression which sum the Value of Dimension B If the Value of Dimension A is null, else it should take the Value of B or null if both dimension don't have any value.
Is this possible?
if worked it's ok, but I'm not sure after to see your data.
Try to use like this bellow please. I believe to be better
Count({<Product={B},CUST_ID={"=sum(Aggr(Count({<Product-={B}>}CUST_ID),CUST_ID))=0"}>}Distinct CUST_ID)
Hi @madmax88 ,
sum({<[Product A]={"=Len([Product A])=0"}>}[Product B])
Hi,
There are is my expression which is not working:
IF((Count({$<Product={'A'}>} Distinct(CUST_ID))>0,0,Count({$<Product={'B'}>} Distinct(CUST_ID)))
Example Data: Result should be 2 (Cust 4 and 5 only have Product B and not A, but Cust 3 has both product and therefor nothing should be counted for Cust 3.
CUST_ID | Product | Order ID |
1 | A | 12 |
2 | A | 13 |
3 | B | 14 |
3 | A | 15 |
4 | B | 16 |
5 | B | 17 |
6 | A | 18 |
if worked it's ok, but I'm not sure after to see your data.
Try to use like this bellow please. I believe to be better
Count({<Product={B},CUST_ID={"=sum(Aggr(Count({<Product-={B}>}CUST_ID),CUST_ID))=0"}>}Distinct CUST_ID)
You're right. It seems not to work after checking detail data. It took me now both (A and B).
With ur new expression it works, Thanks!