Forum Discussion
Compare tables
Hi there,
I do need to compare the product and its parent product.
The structure is this:
CD_PRODUCT INT, DS_PRODUCT VARCHAR, VL_PRODUCT NUMERIC, CD_PRODUCT_PARENT INT.
I do need to show the product, its parent and the parent's information.
Does anyone know how to return a table after compare in dax ? I need to show it on a table/matrix.
Thank you,
Ricardo
Hi ricardocamargos,
In your scenario, you can create a calculated column like below:
Parentinfo = LOOKUPVALUE(Table2[DS_PRODUCT],'Table2'[CD_PRODUCT],'Table2'[CD_PRODUCT_PARENT])
Best Regards,
Qiuyun Yu
4 Replies
- Ashish_MathurSuper User
Hi,
I cannot understand your question. Show a simple dataset and the expected result.
- ricardocamargosContinued Contributor
Hi Ashish_Mathur,
I have a hierarchical product table. It's like this:
COLUMN_NAME - COLUMN_TYPE
CD_PRODUCT - INT,
DS_PRODUCT - VARCHAR,
VL_PRODUCT - NUMERIC,
CD_PRODUCT_PARENT - INT
I can separate the datasets (child product and parent products) but I need to show the parent's information when I click on child product.
I'm attaching an example:
CD_PRODUCT DS_PRODUCT VL_PRODUCT CD_PRODUCT_PARENT 1 PEN 1.00 2 PENCIL 1.00 3 PEN - 2017 1.00 1 4 PENCIL - 2017 1.00 2 Thank you,
Ricardo
- Ashish_MathurSuper User
Hi,
I just do not understand. Someone else who does, will help. Sorry.