Forum Discussion
Anonymous
5 years agoNot applicable
Current and Previous Period Columns based on Slicer selection -&- Remove Subtotals from Text Columns
I created some sample data (files linked below) of something I could use some help on. I would like to create a "Current Period" column, "Previous Period" column, and a "Difference" column. I'd also ...
- 5 years ago
Hi Anonymous ,
Two method:
Method 1: Create measures for text columns.
CostCenter Measure = IF ( ISFILTERED ( 'Employee Expenses'[CCOwnerVP] ), MAX ( 'Employee Expenses'[CostCenter] ) )CostCenterDescription Measure = IF ( ISFILTERED ( 'Employee Expenses'[CCOwnerVP] ), MAX ( 'Employee Expenses'[CostCenterDescription] ) )Date Measure = IF ( ISFILTERED ( 'Employee Expenses'[CCOwnerVP] ), MAX ( 'Employee Expenses'[Date] ) )Then replace your text columns with the measures above.
Method 2: use buttons to cover the subtotals not needed.
BTW, .pbix file attached.
Anonymous
5 years agoNot applicable
I updated my .pbix file on Google Drive as I realized my slicer needed to be on a Calendar Table with continuous dates. I also created two measures, shown below.
Previous Period = CALCULATE(
SUM('Employee Expenses'[Amount]),
SAMEPERIODLASTYEAR(CalendarTbl[Date]))
Difference = CALCULATE(Sum('Employee Expenses'[Amount])-[Previous Period])
I still have not figured out how to remove subtotals from text columns.