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 measure in the last month is bigger than in the current month . It would be green if the opposite is true.

 

Do you have a link or a visual that I can import in my PIBX ?

 

Thank you guys !

 

  • 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

6 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Icon for Community Support rankCommunity Support

    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

    • Anonymous's avatar
      Anonymous
      Not applicable

      v-lili6-msft amitchandak 

      Thank you so much for your help, I really appreciated it and learnt something new.

       

      Have a good day !

  • Nearest seeded is KPI visual. You might have to look in gallery for custom visual