Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

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 ...
  • Icey's avatar
    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.