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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Faye1901
Helper I
Helper I

Secondary Filter IF statement

Hi All

 

I have a simple IF statement that works to display an image URL when conditions are met, but I'd like it to evaluate only in the context of THIS calendar month. At the moment it either rolls up the result for all months in my table or I can get it to display direcrly in a table with each month represented.

It will let me have a second filter but it's not working.

Any ideas?

Up or Down Red = IF([Difference red]=0, PWAURL & "/_layouts/15/inc/PWA/images/cf_50p.png", PWAURL & "/_layouts/15/inc/PWA/images/cf_42p.png")

*Difference Red is just count of current - count of previous month data

Thanks
Faye
2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @Faye1901,

 

Here I made a test by creating a caluclate column.

 

Column = IF(Table2[Difference red]=0,MAX(Table1[Column1]),MIN(Table1[Column1]))

Then change the column to Web URL.

 

Capture.PNG2.PNG

 

Regards,

Frank

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

Thanks for this. I've realised that a calculated column is the answer for sure - so I'm back to the drawing board. 

I've now: 
1. Created a summary table (so I don't need all those measures) using: 

Snapshot Summary =
SUMMARIZE (
ProjectSnapshots,
ProjectSnapshots[OverallStatus],
ProjectSnapshots[Created]
,"Count of Statuses", COUNT( ProjectSnapshots[OverallStatus] ))

2. Trying to create a measure for the previous month without success, at the moment I have: 
Previous Count = sumx(filter(all('Snapshot Summary'), [Created].[MonthNo]=EARLIER('Snapshot Summary'[Created].[MonthNo])-1), 'Snapshot Summary'[Count of Statuses])
 But I'm getting the incorrect result. See below. 

summary table BI.PNG
3. Once I've got that going then I can write the IF statement and it should work 🙂 

Any thoughts! Feels like I'm close to a solution but not quite!

 



Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.