Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning
I have a pivot table that works as intended.
In this table we work on Prod_Id as a first level, then Empl_Id and at last Cust_Chain.
The goal is to see per product, in which chain of customer each employee , has checked how many stores have this product present (#Presence) and how many stores they still have to check for this product to reach their target (To Do).
This pivot table is working well and to the satisfaction of the client.
But! And here it comes, the client wishes for an exception for product SL0051 (not any other product, those have to remain the same), that only user RSS07 (not any other user, they also have to remain the same) gets an additional Cust_Chain, Carrefour Express.
By changing my variable, I'm able to include this new chain without any issue. But the difficulty lies that this chain is automatically added for all products and all other employees
The expression used for example in column Maximum Distribution, for the original table is:
sum(
aggr(
count({< Prod_Id = P(D1_ProdFilter_Prod_Id), $(vDistributionLimitation) >} Prod_Id)
*count({$<$(=vScopeCust), $(vDistributionLimitation) >} Cust_Id)
, Prod_Descr,Cust_Territory_Id,Cust_Chain)
)
The variable vDistributionLimiation is set as follows:
To try my adjustment I added Carrefour Express to the field Cust_Chain_Distr_Obj_Id, but naturally this results in Carrefour Express showing up for all users and products.
I've tried with altering my variable, using if statements in my expression but I can't seem to figure this out.
Always grateful for any input!
you don't need {} braces in if(), that is incorrect
=if( Emp_ID = 'RS007' and Prod_ID= 'Sl00'
, then
, else
)
use an IF() block Measure
=if(Emp_ID='RSS07',
<ExpressionINCLUDINGCarrefourExpressChain>
,
<ExpressionEXCLUDINGCarrefourExpressChain>
)
This has to be done for all measures in the pivot table
Unfortunately this did not help, I've tried this before but now I altered it for all measures as you suggested.
It shows all products in the database, not only those P(D1_ProdFilter_Prod_Id) and everything is a blank
Expression for first measure was altered with variable _Exception1 where Carrefour Express was included :
you don't need {} braces in if(), that is incorrect
=if( Emp_ID = 'RS007' and Prod_ID= 'Sl00'
, then
, else
)
Thank you so much!
I've added the If statement into a variable to make it somewhat more dynamic.