Forum Discussion

vincenzosava's avatar
vincenzosava
Icon for Advocate I rankAdvocate I
1 year ago
Solved

Hide Total Row in Matrix based on Slicer

Hello, I have a complex Matrix for which I want to remove the Total row based on the selected value in the slicer. This because for some tipe of column (like ratio) the total row doesn't make sense.

This is part of my DAX Measures. The Slicer that contains the column that I select for the calculation is "Indicator Filter". 

 

 

Dynamic Indicator Value =
VAR SelectedIndicator = MAX('Indicator Filter'[Indicator])
VAR SelectedResults = MAX('AggregationType'[AggregationType])

VAR AggregatedValue =
    SWITCH(
        SelectedResults,
       "SUM",
            SWITCH(
                SelectedIndicator,
                "Employees", SUM(ResultData[NumberOfEmployees]),
                "Total Assets", SUM(ResultData[TotalAssets]),
                "Total Revenue", SUM(ResultData[OperatingRevenue]),
                "Gross Margin Ratio", SUM(ResultData[GrossMargin]),
                "Cash Ratio", SUM(ResultData[CashRatio]),
               
                BLANK()
            ),
       
    )


RETURN
        AggregatedValue

 

 

 

 

1 Reply