Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have month wise Depatrment wise Consumption. Now i want to take Average of Previos 3 month consumption.
In case consumption of current month is more than average of previous 3 months, then i want red sign next to the current month value in my table and in case it is less than the average of previous 3 months, then i want green sign next to the current month value.
Sample table below
Hi @ddhingra
You can try the following format measure, 1 is green and 0 is red
Formatting Measure =
VAR CurrentConsumption = [Consumption]
VAR Average3MonthsConsumption =
AVERAGEX (
TOPN (
3,
SUMMARIZE (
ALLSELECTED ( 'Table' ),
'Date'[YearMonth],
"@Consumption", CALCULATE ( [Consumption], ALL ( 'Date'[MonthName] ) )
),
'Date'[YearMonth], ASC
),
[@Consumption]
)
RETURN
INT ( Average3MonthsConsumption > CurrentConsumption )
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
10 | |
7 | |
6 | |
6 |
User | Count |
---|---|
30 | |
11 | |
11 | |
10 | |
6 |