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
iqbalck
Frequent Visitor

How to use a calculated measure in a matrix/table visualisation

I have a database where I have the country, region etc in columns, and in another column attributes like Sales, Gross Profit, other costs etc and in the last column the values. I am trying to calculate the Gross Profit as % of Sales in a calculated measure and use this measure in the Matrix / Table visualisation. In the table I have in the rows Sales, Gross Profit, other costs and so on (from attributes column of database) and in columns I have the values for these. I want to add Gross profit % of Sales in the rows and in the column the value of this. When I try to do this I get the calculated measure on a separate column. Any help appreciated.

5 REPLIES 5
tringuyenminh92
Memorable Member
Memorable Member

Oh, sorry, i posted wrong topic.

Table.png

Thanks. But the data I have is as above. and the visualisation table is as below:

 

Visualisation.png

 and in the above visualisation table I need to add the calculated measure (gross profit / Sales) which will be 36.3%

Hi @iqbalck,

 

I think with ALL method you could calculate sum of total:

 

(%) = DIVIDE(SUM(Sheet1[Value]),CALCULATE(SUM(Sheet1[Value]),all(Sheet1)))

Screenshot 2017-01-16 22.28.35.png

 

Hope this is what you are expecting.Smiley Very Happy

No, I am trying to insert the calculated measure below the Gross Profit. You have inserted the calculation on the new column instead of the row. And also the calculation is not required as sum of total.

Hi @iqbalck

Based on your description, it seems that you want to create a table/Matrix visual as below. If that is the case, it is not possible.

1.PNG


In your current table visual, each row is consist of values of Attribute field and Value field , the measure you create is just a calculated value based on the values of Attribute field and Value field, you can create another visual to host the measure.

Thanks,
Lydia Zhang

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

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.

Top Solution Authors