Forum Discussion
Anonymous
4 years agoNot applicable
Select fields based on category in a table with DAX calculation
Hello, Is it possible to use a specific field based on what the dimension is? Like the example below: What I have: What I am looking for: I cannot merge the two columns in t...
- 4 years ago
Hi Anonymous ,
Try to add a new table with the following code:
Table 2 = UNION ( SELECTCOLUMNS ( FILTER ( 'Table', 'Table'[Customer] <> BLANK () ), "Customer/Product", 'Table'[Customer], "Dimension", 'Table'[Dimension] ), SELECTCOLUMNS ( FILTER ( 'Table', 'Table'[Product] <> BLANK () ), "Customer/Product", 'Table'[Product], "Dimension", 'Table'[Dimension] ) )
MFelix
4 years agoSuper User
Hi Anonymous ,
Try to add a new table with the following code:
Table 2 =
UNION (
SELECTCOLUMNS (
FILTER ( 'Table', 'Table'[Customer] <> BLANK () ),
"Customer/Product", 'Table'[Customer],
"Dimension", 'Table'[Dimension]
),
SELECTCOLUMNS (
FILTER ( 'Table', 'Table'[Product] <> BLANK () ),
"Customer/Product", 'Table'[Product],
"Dimension", 'Table'[Dimension]
)
)