Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a pivot table where the column is Product.
This pivot only shows products that belong to Category A.
A second pivot table displays only products from Category B.
When a user selects a product from the first pivot (Category A), a variable is set to check if the selected product exists in the list of Category A products.
✅ If the selected product is in Category A, the column Value should display the value for that product.
❌ If the selected product is not in Category A (i.e., from Category B), then all products from Category A should be displayed, ignoring the selection, because the user might have clicked a product from the second pivot (Category B).
I created an IF condition to handle this logic.
However, when I select a product from Category B, the Value column in the first pivot becomes empty or null — nothing is shown.
What is wrong with this IF condition?
Why is the column not showing values when selecting a product from Category B?
How can I fix this logic so that the column still shows all Category A products in that case?
if(
WildMatch(vListProducts,''& [Products] &'')>0, pick(WildMatch(vListProducts,''& [Products] &''), Only({<[Category]={'A'}>} [Value]), Only({<[Produtcs],[Category]={'A'}>} [Value]) ),Only({<Products, [Category]={'A'}>} [Value]))
Hi,
You can maybe do something with "Alternate states".
Let's assume we have these data load :
Source:
LOAD * INLINE [
Product, Category, Value
P1, A, 100
P2, B, 200
P3, A, 150
P4, B, 250
P5, A, 400
P6, B, 600
]
;
Let's create 2 pivot tables with Product and value sum with a set analysis on category :
In master items, you can create 2 alternate states 'Category A' & 'Category B' for exemple :
Then, in he pivot table paramters "Appearance / Alternate states" you can select the corresponding alternate state. Do so for the 2 pivot tables.
One this done, you can select independently products from Category A or Category B without impacting the other pivot table.
Let me know if this solution fits to your requirement. If yes, tick it a a solution.
Regards
SRA