Forum Discussion

Power_BI_Outlaw's avatar
Power_BI_Outlaw
Regular Visitor
2 years ago
Solved

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))

 

 

  • 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? 🙂

     

     

1 Reply

  • 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? 🙂