Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

MaxMin On Column Chart

Hello everyone, i have revenue table and calendar table total revenues = Sum(Revenue_table[Total]) i wantto conditional format my column chart to look like this in desired color the max number...
  • Greg_Deckler's avatar
    3 years ago

    Anonymous You could do something like this:

    Measure =
      VAR __Value = [total revenues]
      VAR __Table = SUMMARIZE(ALLSELECTED('Table',),[Date],"__Measure",[total revenues])
      VAR __Max = MAXX(__Table,[__Measure])
      VAR __Min = MINX(__Table,[__Measure])
    RETURN
      SWITCH(TRUE(),
        __Value = __Max,1,
        __Value = __Min,2,
        3
      )

    Set your conditional color for your Columns to be Rules and set your rules accordingly.

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous ,

    I created some data:

    Here are the steps you can follow:

    1. Create measure.

    Measure =
    SWITCH(
        TRUE(),
        MAX('Table'[Amount])=MAXX(ALLSELECTED('Table'),[Amount]),"green",
        MAX('Table'[Amount])=MINX(ALLSELECTED('Table'),[Amount]),"red",
        "grey")

    2. Column – Colors – FX.

    3. Enter the Default color interface.

    4. Result:

    If you need pbix, please click here.

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly