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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BIswajit_Das
Super User
Super User

POWER BI CALCULATED TABLE

Hello,

I've got a demo data :

i.e

SLNOPRODUCTTYPE
1AX1
1BX2
1CX3
1DX1
1EX4
1RX2
1FX1
1GX2
1IX1
2JX1
2KX1
2MX1
2LX2
2NX2
2OX2

and 

my required calculated column is like

SLNOX1X2X3X4TOTAL
143119
233006

Thanks & Regards...

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @BIswajit_Das

Based on the further requirements you have provided me, it seems that you are trying to achieve the effect you need not by matrix but by calculate column.

You can create a calculated column to calculate the number of rows of type "X1" in the first column.

X1 =

     COUNTROWS(FILTER('Table', 'Table'[SLNO] = 1 && 'Table'[TYPE] = "X1"))

vyilongmsft_0-1706058775122.png

This method is available in the final Visualizations to get the final results you need.

vyilongmsft_1-1706058813383.png

vyilongmsft_2-1706058813384.png

 

 

 

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
BIswajit_Das
Super User
Super User

Hello @Anonymous is it possible without using matrix

Creating a caculated column instead

Anonymous
Not applicable

Hi, @BIswajit_Das

Based on the further requirements you have provided me, it seems that you are trying to achieve the effect you need not by matrix but by calculate column.

You can create a calculated column to calculate the number of rows of type "X1" in the first column.

X1 =

     COUNTROWS(FILTER('Table', 'Table'[SLNO] = 1 && 'Table'[TYPE] = "X1"))

vyilongmsft_0-1706058775122.png

This method is available in the final Visualizations to get the final results you need.

vyilongmsft_1-1706058813383.png

vyilongmsft_2-1706058813384.png

 

 

 

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Hi, @BIswajit_Das 

Based on the information you have provided, Here are my answers to your questions.

1. Create a table according to your requirements.

vyilongmsft_0-1704422972991.png

 

2. Create a Matrix with SLNO as Rows and TYPE as Columns.

vyilongmsft_1-1704422993742.png

 

3. Create a Measure and migrate it to Values.

Measure =

     COUNTROWS('Table (2)')

vyilongmsft_2-1704423022538.png

 

4. Then you can get the results you need

vyilongmsft_3-1704423045397.png

 

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

Best Regards

Yilong Zhou

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ThxAlot
Super User
Super User

You can't dynamically add columns to a calculated table (ie X1/X2/X3 ...); thus use pivot table viz or transform it in PQ by unpivoting TYPE column.



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.