Forum Discussion
How to calculate the difference between two numbers to create new measure
- 10 years ago
Hi SimonJacobs. It sounds like this is already in a table with the structure you provided. I'll call the columns Brand, Impression, and Percent. With that, you could start with a simple measure:
Percent Sum = SUM(TableName[Percent])
That might not be useful on its own, but you can use it in two more measures that specify how you want to calculate it:
Percent Aware = CALCULATE([Percent Sum], TableName[Impression]="Aware")
Percent Familiar = CALCULATE([Percent Sum], TableName[Impression]="Familiar")
Combine those to get your end result:
Aware but not Familiar = [Percent Aware] - [Percent Familiar]
You could do all of that in one step, but those building blocks will help with your readability and you can reuse them for other measures as well.
Hi SimonJacobs. It sounds like this is already in a table with the structure you provided. I'll call the columns Brand, Impression, and Percent. With that, you could start with a simple measure:
Percent Sum = SUM(TableName[Percent])
That might not be useful on its own, but you can use it in two more measures that specify how you want to calculate it:
Percent Aware = CALCULATE([Percent Sum], TableName[Impression]="Aware")
Percent Familiar = CALCULATE([Percent Sum], TableName[Impression]="Familiar")
Combine those to get your end result:
Aware but not Familiar = [Percent Aware] - [Percent Familiar]
You could do all of that in one step, but those building blocks will help with your readability and you can reuse them for other measures as well.
- SimonJacobs10 years ago
Helper I
This is great, thank you!