The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi guys!
I am doing a matrix with two versions and I need to calculate the diference between the second and the first.
The values are in the same column and I am using the same measure to calculate the total.
Is it possible to create a dinamic measure to calculate this?
I can change the versions, but always keeping two versions to compare the diference between it.
The choose will be from data segmentation or filter.
Thanks a lot for help!!!
Solved! Go to Solution.
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.
Hi,
The mesure worked in the card, but when I put in the matrix shows other value and duplicate the column.
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)
Thanks a lot!!!!
It is working!
Can you provide the DAX measures for those 2? R&o and Vendas?
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
102 | |
83 | |
63 | |
57 |
User | Count |
---|---|
254 | |
119 | |
115 | |
100 | |
76 |