Forum Discussion
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
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.
Next, resize and position for three card visual to get your requirement.
here is sample pbix file, please try it.
Regards,
Lin
- AnonymousNot applicable
Thank you so much for your help, I really appreciated it and learnt something new.
Have a good day !
- amitchandak
Super User
Nearest seeded is KPI visual. You might have to look in gallery for custom visual
- AnonymousNot 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 ?
- amitchandak
Super User
Try Group visual. I think using image display you should be able to add that arrow
https://powerbi.microsoft.com/en-us/blog/power-bi-desktop-august-2019-feature-summary/#grouping
Group 2-3 cards
Also refer : https://community.powerbi.com/t5/Desktop/FORMAT-icon-set-for-use-in-a-data-card/td-p/811692