Forum Discussion

ask's avatar
ask
Helper III
9 years ago
Solved

conditional format

Hi,   I need apply for Conditioal Formatting function to a column in a table.  Looks like need to appy for aggregation funciton first before letting me do that. For example "Maximum"  If choose Max...
  • v-caliao-msft's avatar
    9 years ago

    ask,

     

    If you select different aggregation for your field, the column name will change automatically. And there is no such a option for us to delete the prefix of the column. To work around this issue, you can create another measure to aggregate your field.

    1. Create a table like
    2. Add this aggregation to a slicer.
    3. Create a measure in original table.
      Measure =
      var SelectedItem = MAX(Table2[Aggregation])
      var result = IF(SelectedItem="Sum",SUM(Table1[Amount]),IF(SelectedItem="Max",MAX(Table1[Amount]),IF(SelectedItem="Min",MIN(Table1[Amount]),AVERAGE(Table1[Amount]))))
      return result

    Result

     

    Regards,

    Charlie Liao