Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
AmiraBedh
Super User
Super User

Create a calculated table with an input column and calculated column

I want to create a table in Power BI like below :

 

Product Year  Count

A           2020 100

B           2021  569

C           2021    99

 

The product is an input column which means I provide the name in the creation of the calculated table.

The Year is the group by column and the count is the a measure : counting the rows of the product A by Year


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696
1 ACCEPTED SOLUTION
Anonymous
Not applicable

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

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

amitchandak
Super User
Super User

@AmiraBedh , Last two are easy, they can be driven using group by power query or summarize of DAX.

 

How do you want calculate the product, that you need to tell to suggest solutions

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.