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
tgsilva07
Regular Visitor

Calcular % de sub-totais em uma Matriz

Como mostrar o % de um sub-total em uma Matriz, segue abaixo imagem da Matriz.

tgsilva07_0-1696616682239.png

Segue abaixo a medida utilizada.

 

tgsilva07_1-1696616725922.png

Criei a medida abaixo e tentei colocar no visual, porem não fucionou

% Lucro Operacional = [(3) Lucro Operacional] / [(1) Receita Total]

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi  @tgsilva07 ,

 

You can try the following measure:

True =
var _table=SUMMARIZE('DRE','DRE'[Tipo],"Value",[DER1])
return
IF(
  HASONEVALUE(DRE[Tipo]),[DER1],
  FORMAT(
  DIVIDE(
  SUMX(
    FILTER(ALL('DRE'),
      'DRE'[Tipo] = "% Lucro Operacional" || 'DRE'[Tipo]="% Lucro Liquido"),[Value]),
    SUMX(_table,[Value])
),"percent"))

If it does not meet your expectations, you can express the desired result in the form of a picture, and we can help you better

 

 

Best Regards,

Liu Yang

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
Anonymous
Not applicable

Hi  @tgsilva07 ,

 

You can try the following measure:

True =
var _table=SUMMARIZE('DRE','DRE'[Tipo],"Value",[DER1])
return
IF(
  HASONEVALUE(DRE[Tipo]),[DER1],
  FORMAT(
  DIVIDE(
  SUMX(
    FILTER(ALL('DRE'),
      'DRE'[Tipo] = "% Lucro Operacional" || 'DRE'[Tipo]="% Lucro Liquido"),[Value]),
    SUMX(_table,[Value])
),"percent"))

If it does not meet your expectations, you can express the desired result in the form of a picture, and we can help you better

 

 

Best Regards,

Liu Yang

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

Obrigado. Conseguir resolver.

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.