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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Power_BI_Outlaw
Regular Visitor

Limit 1 Line to specific date

Hey

 

I have a visual showing the minimum and maximum temperatures over a 3 year period. I've created a measure that calculates the average 5 year minimum temperatures. I don't want to effect the calculation of the meausre, but only require the measure to be shown from October 1, 2024 as the average data before this period isn't required and I think it'll clean the visual up a little bit.

 

Any insight on how to accomplish this before my laptop ends up smashed on the ground (joking).

 

Average Min Year = CALCULATE(AVERAGE('4A - ENVIRONMENT CANADA'[MIN_TEMPERATURE]),DATEADD('4A - ENVIRONMENT CANADA'[DATE],-5,YEAR))

 

Power_BI_Outlaw_0-1710366816234.png

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

a measure that calculates the average 5 year minimum temperatures

That's not what your measure does

 only require the measure to be shown from October 1, 2024

Add an IF statement

 

Measure = IF(max('4A - ENVIRONMENT CANADA'[DATE])>dt"2024-10-01"),result)

 

How are you planning to collect temperatures from the future? 🙂

 

 

View solution in original post

1 REPLY 1
lbendlin
Super User
Super User

a measure that calculates the average 5 year minimum temperatures

That's not what your measure does

 only require the measure to be shown from October 1, 2024

Add an IF statement

 

Measure = IF(max('4A - ENVIRONMENT CANADA'[DATE])>dt"2024-10-01"),result)

 

How are you planning to collect temperatures from the future? 🙂

 

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.