Forum Discussion
create table based on another table
- 5 years ago
Hi
To create a table ased on a single row per unique value we can use the SUMMARIZECOLUMNS funtion, we then nee to calculate the two values, this is faiully striagforward for the second on as it is simply the Maximum value for each row. The 'premium plus' is a little harder but can be done using the SEARCH function to finter for SKU's with the condition then counting such rows then converting those into YES or No. The below formula shoudl work for you to create the table you are looking for.
Table2 =
SUMMARIZECOLUMNS (
'Table1'[Customer ID],
"Has text 'Premium Plus' in any SKU?",
IF (
COUNTROWS (
FILTER ( 'Table1', SEARCH ( "Premium Plus", Table1[SKU], 1, 0 ) > 0 )
),
"Yes",
"No"
),
"Max (Quantity)", MAX ( 'Table1'[Quantity] )
)
Hi
To create a table ased on a single row per unique value we can use the SUMMARIZECOLUMNS funtion, we then nee to calculate the two values, this is faiully striagforward for the second on as it is simply the Maximum value for each row. The 'premium plus' is a little harder but can be done using the SEARCH function to finter for SKU's with the condition then counting such rows then converting those into YES or No. The below formula shoudl work for you to create the table you are looking for.
Table2 =
SUMMARIZECOLUMNS (
'Table1'[Customer ID],
"Has text 'Premium Plus' in any SKU?",
IF (
COUNTROWS (
FILTER ( 'Table1', SEARCH ( "Premium Plus", Table1[SKU], 1, 0 ) > 0 )
),
"Yes",
"No"
),
"Max (Quantity)", MAX ( 'Table1'[Quantity] )
)