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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
killingaxe
Frequent Visitor

Calculate columns which are identified on rows

Hi all,

 

I'm currently trying to setup a visual but am not able to manage.

 

I have got my data in one table, and the headers of this table match the rows of another table via which I would want to filter.

 

TypeABCD
People1233
Machines10682
Terminators85214

 

CountrySector
USA
USB
UKC
CHD

 

So if I would filter on US an additional column would have the below result.

 

TypeABCDTotal filterd (A+B)
People12333
Machines1068216
Terminators8521413

 

Many thanks for looking into it.

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @killingaxe,

 

For your output, you could get it without creating a calculated column.

 

Actually ,the calculated column is not dynamic so you can't get the output when you filter on US.

 

You could try to follow the steps below to get your desired output.

 

1. You should create the relationship of the two table so you need to unpivot columns in Query Editor.

 

Untitled6.png

2. Create the relationship of the two tables like below.

 

Capture10.PNG

3.Then you could create the Matrix visual like below.

 

Capture2.PNG

 

 

Hope it can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
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

2 REPLIES 2
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @killingaxe,

 

For your output, you could get it without creating a calculated column.

 

Actually ,the calculated column is not dynamic so you can't get the output when you filter on US.

 

You could try to follow the steps below to get your desired output.

 

1. You should create the relationship of the two table so you need to unpivot columns in Query Editor.

 

Untitled6.png

2. Create the relationship of the two tables like below.

 

Capture10.PNG

3.Then you could create the Matrix visual like below.

 

Capture2.PNG

 

 

Hope it can help you!

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft,

 

This worked perfectly.

 

Thanks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.