Forum Discussion
Measure filter for rate trend analysis
https://drive.google.com/file/d/1cxRnqRJVf6ZaOl7I9TbUMyMmh962rvwS/view?usp=sharing Hi,
First time post and long time user of Power BI and i'm currently stuck with the following scenario.
I am trying to create a rate analysis trend with conditional formatting and filter only based on Increased/decrease/no change.
Example below is within Excel of how it should look and attached power bi dummy data.
Dataset is the rate for different employees for different period.
| Month | Employee | Rate |
| Jul-21 | A | 500 |
| Aug-21 | A | 600 |
| Sep-21 | A | 600 |
| Oct-21 | A | 600 |
| Nov-21 | A | 600 |
| Dec-21 | A | 600 |
| Jul-21 | B | 900 |
| Aug-21 | B | 850 |
| Sep-21 | B | 850 |
| Oct-21 | B | 850 |
| Nov-21 | B | 850 |
| Dec-21 | B | 850 |
| Jul-21 | C | 700 |
| Aug-21 | C | 700 |
| Sep-21 | C | 700 |
| Oct-21 | C | 700 |
| Nov-21 | C | 700 |
| Dec-21 | C | 700 |
| Jul-21 | D | 800 |
| Aug-21 | D | 700 |
| Sep-21 | D | 750 |
| Oct-21 | D | 750 |
| Nov-21 | D | 750 |
| Dec-21 | D | 750 |
| Jul-21 | E | 600 |
| Aug-21 | E | 650 |
| Sep-21 | E | 670 |
| Oct-21 | E | 670 |
| Nov-21 | E | 670 |
| Dec-21 | E | 670 |
What i'm trying to achieve is being able to filter the list of employee that has had an increase or decreased within the period.
I've tried to use a disconnected table as a filter, however it will only show me the employee with the month that has an increase/decrease as example below:
2 Replies
- amitchandak
Super User
Anonymous , If you have a date; you can create a MOM measure and use that in conditional formatting. else create a date using the month
Date = "01-" &[Month year] /// change data type to date
Use date table
Create a month in date tanle and use that in visual
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))MOM = [MTD Sales] - [Last MTD Sales]
Create color =
if([MOM] <0 , "Red", "Green" )
How to do conditional formatting by measure and apply it on pie?: https://youtu.be/RqBb5eBf_I4
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Use this in conditional formatting using field value option
- AnonymousNot applicable
Thank you for replying so quickly amitchandak
I've tried the formula but i'm not looking for a difference in current month sales and previous month sales.
I'd like to keep the rates there and if a slicer filter is selected of "Decreased or "Increased".
Picture below is if the slicer is unfiltered, decreased (red) and increased (green).
Keeping the same amounts within the selected filter with the conditional formatting.
I hope this makes sense.
Thanks,
Ken