Forum Discussion
Create a calculated table with an input column and calculated column
- Anonymous4 years ago
Hi AmiraBedh ,
You could use SUMMARIZE() function.
https://docs.microsoft.com/en-us/dax/summarize-function-dax
Since the product is an input column, you will need to filter the table for each product before summarize it. Ie create multiple summarized table based on products then union the summarized tables.
For example:
new_table = var product_a = SUMMARIZE(FILTER(Table,Conditon1),[Year]"product","A",COUNT([column])) var product_b = SUMMARIZE(FILTER(Table,Conditon2),[Year]"product","B",COUNT([column])) return union(product_a,product_b)If I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay
Hi AmiraBedh ,
You could use SUMMARIZE() function.
https://docs.microsoft.com/en-us/dax/summarize-function-dax
Since the product is an input column, you will need to filter the table for each product before summarize it. Ie create multiple summarized table based on products then union the summarized tables.
For example:
new_table =
var product_a = SUMMARIZE(FILTER(Table,Conditon1),[Year]"product","A",COUNT([column]))
var product_b = SUMMARIZE(FILTER(Table,Conditon2),[Year]"product","B",COUNT([column]))
return
union(product_a,product_b)
If I misunderstood your meaning, please share some sample data and expected result.
Best Regards,
Jay