charleshale
3 years agoContinued Contributor
Totalling selected values
Let's say I have a table named FRUIT that looks like this: TYPE QUANTITY Bananas 2 Oranges 3 Kiwi 4 My goal is to Sum only Bananas and Oranges and have those sums show only...
- 3 years ago
Hi,
Please check the below picture and the attached pbix file.
expected measure one: = CALCULATE ( SUM ( Fruit[Quantity] ), KEEPFILTERS ( Fruit[Type] IN { "Bananas", "Oranges" } ) )expected measure two: = IF ( HASONEVALUE ( Fruit[Type] ), SUM ( Fruit[Quantity] ), CALCULATE ( SUM ( Fruit[Quantity] ), KEEPFILTERS ( Fruit[Type] IN { "Bananas", "Oranges" } ) ) )