Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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 

Capture.PNG

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 !

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community 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.

9.JPG

 

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

7.JPG8.JPG

 

here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-lili6-msft
Community Support
Community 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.

9.JPG

 

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

7.JPG8.JPG

 

here is sample pbix file, please try it.

 

Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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 !

amitchandak
Super User
Super User

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

Anonymous
Not applicable

@@amitchand 

It is close to what I'm looking for but it doesn't work in my case because I would like to compare the current month to the last month and this KPI display 2 measures calculated in the same periode of time , by example the sales vs the target for each month.

 

Do you have something else ?

@Anonymous 

Build something very near to you want. You need have the arrow in middle. Arrow code and arrow color code

/////Arrow 
Arrow = 
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
            TRUE(),
            _change > 0, UNICHAR(9650),
            _change = 0, UNICHAR(9654),
            _change < 0, UNICHAR(9660)
            )


/////Arrow Color
Arrow color = 
var _change =[Net Sales YTD]-[Net Sales LYTD]
return
SWITCH (
            TRUE(),
            _change > 0, "green",
            _change = 0, "blue",
            _change < 0, "red"
            )

 

Link I have given in last update. The difference in conditional formatting I used field option and choose the measure

 

Screenshot 2020-03-02 23.34.29.png

 

You can play with background-color etc

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors