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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Stefanve
Frequent Visitor

Accentuating a period that is longer than 10 days and higher than 15 degrees

Hi,

 

In the scenario below i have a date and temperature column.

What we are trying to visualize is accentuating a period that is longer than 10 days and higher than 15 degrees. Like the Excel example below.

 

Who can help me visualise this?

 

Stefanve_0-1634895449853.png

Thanks,

 

Stefan

1 ACCEPTED SOLUTION
ikor42
Regular Visitor

Hi,
try this measure:

Temperature_15_and_higher =
VAR _cur_date = SELECTEDVALUE ( Temp[Date] )
VAR _first_date_before_below_15 =
MAXX (
FILTER (
ALL ( Temp ),
Temp[Date] <= _cur_date &&
Temp[Date] >= _cur_date - 9 &&
Temp[Temprature] < 15
),
Temp[Date]
)
VAR _first_date_after_below_15 =
MINX (
FILTER (
ALL ( Temp ),
Temp[Date] >= _cur_date &&
Temp[Date] <= _cur_date + 9 &&
Temp[Temprature] < 15
),
Temp[Date]
)
VAR _number_of_days =
IF ( ISBLANK ( _first_date_before_below_15 ), 10, INT(_cur_date - _first_date_before_below_15) ) +
IF ( ISBLANK ( _first_date_after_below_15 ), 10, INT(_first_date_after_below_15 - _cur_date) ) -
1
RETURN
IF ( _number_of_days >= 10, SELECTEDVALUE(Temp[Temprature]), BLANK() )
 


We can put this measure along with Temprature field on the visual. The result is next:

ikor42_0-1634908600659.png

 

 

View solution in original post

1 REPLY 1
ikor42
Regular Visitor

Hi,
try this measure:

Temperature_15_and_higher =
VAR _cur_date = SELECTEDVALUE ( Temp[Date] )
VAR _first_date_before_below_15 =
MAXX (
FILTER (
ALL ( Temp ),
Temp[Date] <= _cur_date &&
Temp[Date] >= _cur_date - 9 &&
Temp[Temprature] < 15
),
Temp[Date]
)
VAR _first_date_after_below_15 =
MINX (
FILTER (
ALL ( Temp ),
Temp[Date] >= _cur_date &&
Temp[Date] <= _cur_date + 9 &&
Temp[Temprature] < 15
),
Temp[Date]
)
VAR _number_of_days =
IF ( ISBLANK ( _first_date_before_below_15 ), 10, INT(_cur_date - _first_date_before_below_15) ) +
IF ( ISBLANK ( _first_date_after_below_15 ), 10, INT(_first_date_after_below_15 - _cur_date) ) -
1
RETURN
IF ( _number_of_days >= 10, SELECTEDVALUE(Temp[Temprature]), BLANK() )
 


We can put this measure along with Temprature field on the visual. The result is next:

ikor42_0-1634908600659.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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