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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
fhei_navarro
Frequent Visitor

Conditional formatting by rows

Hi All,

Can you help me please how to compare 2 rows? as you can see below image, I want to have a status on my table comparing the last two months(if August>July,1 else 0) and then format it with icons, red and green.

table at power bitable at power bi

i want to make look like this (i made this in excel)

table excel.PNG

I appreciate all your help,thanks.

 

2 REPLIES 2
fhei_navarro
Frequent Visitor

@amitchandak thank you for your help, but how can i place the indicators by rows? I made all the measurements but it seemed that i can only place it by columns.

amitchandak
Super User
Super User

@fhei_navarro , You have to create a measure MOM using a date table and time intelligence. You have use month year, year, month in visual from date table

 

MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last month Sales = CALCULATE(SUM(Sales[Sales Amount]),previousmonth('Date'[Date]))

this month = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH('Date'[Date])))

 

Indicator = if([This Month] >= [Last Month] ,1,0)

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors