Forum Discussion
2487jbml
6 years agoFrequent Visitor
Grand Total Manipulation
Hi all,
Is there a way to manipulate the grand total for a column? I have multiple columns and the grand totals are all calculating correctly. However, each departments goals have been slightly inflated but leadership would like for the grand total to be uninflated. Is there a way to do that? The goal data is stored in a table created in Power BI. Here's an example:
| Department | Goal | Desired Goal | |
| A | 10 | 10 | |
| B | 20 | 20 | |
| C | 30 | 30 | |
| D | 10 | 10 | |
| E | 20 | 20 | |
| Sum, but not desired overall goal-> | 90 | 70 | <- Hard number, not total of sums, but is the actual goal |
Hi 2487jbml ,
Please create a measure like that to work on it.
D = VAR dr = CALCULATE ( SUM ( 'Table'[Goal] ) ) RETURN IF ( ISFILTERED ( 'Table'[Department] ), dr, 70 )
2 Replies
- amitchandak
Super User
You can use isfiltered and change the value when there is not filtered values
https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/
https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/
- v-frfei-msft
Community Support
Hi 2487jbml ,
Please create a measure like that to work on it.
D = VAR dr = CALCULATE ( SUM ( 'Table'[Goal] ) ) RETURN IF ( ISFILTERED ( 'Table'[Department] ), dr, 70 )