Forum Discussion
Measure inside Matrix to calculate de diference
- 4 years ago
You are using Versao in the column of the matrix. Remove that and do this:
Create this measures:Total Ton R&O =
calculate( SUM('fPlanoVendas'[Tonelada]), 'fPlanoVendas'[Version] = "2022 Rev.1 - R&O")Total Ton Verdas =
calculate( SUM('fPlanoVendas'[Tonelada]), 'fPlanoVendas'[Version] = "2022 Rev.2 - Vendas")Diff = [Total Ton R&O] - [Total Ton Verdas]
Use all 3 measures in the matrix ( and dont forget to remove Versao from the column matrix)
MatSantos , You need to create a measure like
calculate( SUM('fPlanoVendas'[Tonelada]), filter('fPlanoVendas', 'fPlanoVendas'[Version] = "2022 Rev.1 R&O")) -calculate( SUM('fPlanoVendas'[Tonelada]), filter('fPlanoVendas', 'fPlanoVendas'[Version] = "2021 Rev.1 R&O"))
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
- MatSantos4 years agoRegular Visitor
Hi,
The mesure worked in the card, but when I put in the matrix shows other value and duplicate the column.
- Tutu_in_YYC4 years ago
Super User
You are using Versao in the column of the matrix. Remove that and do this:
Create this measures:Total Ton R&O =
calculate( SUM('fPlanoVendas'[Tonelada]), 'fPlanoVendas'[Version] = "2022 Rev.1 - R&O")Total Ton Verdas =
calculate( SUM('fPlanoVendas'[Tonelada]), 'fPlanoVendas'[Version] = "2022 Rev.2 - Vendas")Diff = [Total Ton R&O] - [Total Ton Verdas]
Use all 3 measures in the matrix ( and dont forget to remove Versao from the column matrix)- MatSantos4 years agoRegular Visitor
Thanks a lot!!!!
It is working!