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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors