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.
Dears,
I have two different types of periods - actual and budget. For each I have different source files with absolutely different information. Is it possible to create a measure that would switch the calculations for two different statuses?
For example, for Third Party Trade Receivables incurred in case of budget I'd use the following measure:
Third Party Trade Receivables inc = CALCULATE(sum('Incurred'[Liabilities Incurred]); 'Incurred'[Counterparty Group]="Third Party"; Incurred'[Category]="Revenue from Sales of Products and Services")
For the same indicator but in actual mode I use this measure:
Third Party Trade Receivables inc = CALCULATE(sum('Sales'[Revenue]); 'Sales'[Group]="Third Party") + CALCULATE(sum('PL'[Sum]; 'PL'[Item]="Revenue from Services").
So, the question is, how could I merge these two measures, so that in the report I could avoid changing the columns on visualizations each time, when I would change the status from actual to budget and vice versa?
I tried using IF statement, but my measures are in a separate table which has no relationships with other tables, so it seems not to work.
The status slicer comes in the reports from the related table. The relationships are as follows:
Thank you beforehand.
Solved! Go to Solution.
Hi @foyiq,
Could you try the formula below to see if it works in your scenario?
Third Party Trade Receivables inc = IF ( HASONEVALUE ( 'Slicer'[Slicer] ); IF ( VALUES ( 'Slicer'[Slicer] ) = "budget"; CALCULATE ( SUM ( 'Incurred'[Liabilities Incurred] ); 'Incurred'[Counterparty Group] = "Third Party"; 'Incurred'[Category] = "Revenue from Sales of Products and Services" ); CALCULATE ( SUM ( 'Sales'[Revenue] ); 'Sales'[Group] = "Third Party" ) + CALCULATE ( SUM ( 'PL'[Sum] ); 'PL'[Item] = "Revenue from Services" ) ) )
Regards
Hi @foyiq,
Could you try the formula below to see if it works in your scenario?
Third Party Trade Receivables inc = IF ( HASONEVALUE ( 'Slicer'[Slicer] ); IF ( VALUES ( 'Slicer'[Slicer] ) = "budget"; CALCULATE ( SUM ( 'Incurred'[Liabilities Incurred] ); 'Incurred'[Counterparty Group] = "Third Party"; 'Incurred'[Category] = "Revenue from Sales of Products and Services" ); CALCULATE ( SUM ( 'Sales'[Revenue] ); 'Sales'[Group] = "Third Party" ) + CALCULATE ( SUM ( 'PL'[Sum] ); 'PL'[Item] = "Revenue from Services" ) ) )
Regards
@sokgThank you very much! I will get back to this video in no time.
@v-ljerr-msft Thank you, let me try this. It definitely looks like it's gonna work!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |