Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Visual displays the variation between 2 months

Hi team,   I'm looking for a visual to display the variation of a measure between the current month and the last month. Something like this  The visual will display in red color if the meas...
  • v-lili6-msft's avatar
    6 years ago

    hi  Anonymous 

    You could get it by use three card visual to custom it.

    Create four measure as below:

    current month = CALCULATE(SUM('Table'[Value]))
    
    last month = CALCULATE(SUM('Table'[Value]),PREVIOUSMONTH('Date'[Date]))
    
    variation = [current month]-[last month]
    Icon = 
    VAR theIndicator = [variation]
    RETURN
       SWITCH (
                TRUE(),
                theIndicator >=0, UNICHAR(9650),
                theIndicator <0, UNICHAR(9660)
                )

    Drag [Current month], [variation], and [Icon] to three card visual.

    Now, in format pane, remove Category and set background is back.

    Then set conditional format for these three cards by the same logic for data label.

     

    Next, resize and position for three card visual to get your requirement.

     

    here is sample pbix file, please try it.

     

    Regards,

    Lin