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
NZCraig
Helper I
Helper I

Apply a filter to remove a specific date for DST

Hi,

I have a table that shows days divided into 30 min segments, with a production total for each period and when there is a Daylight Saving day, there will be 50 or 46 segments, not 48. I need to be able to display the best production day, but exclude days that have 50 segments. Example table below - not showing all periods 🙂 I need to be able to show the total for days including DST so can't just filter out the days where DST occurs.

 

I have referenced the source table and grouped by the date column to find the day with the highest value, but I am stuck in trying to find a way to filter out an entire day so that I can take the best day, ignoring DST changes. Any advice would be appreciated!

DATE YYYYMMDD      PERIOD     OUTPUT
2021052046321.1
2021052047320.0
2021052048319.6
.........
2021052146322.1
2021052147321.5
2021052148320.2
2021052149 318.4
2021052150320.5
.........
2021052246312.2
2021052247319.0
2021052248319.9

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @NZCraig ,

 

According to the table you provided, I first created a date column.

Date = Date(Left([DATE YYYYMMDD],4),Right(left([DATE YYYYMMDD],6),2),right([DATE YYYYMMDD],2))

vstephenmsft_0-1646206848548.png

 

Then create two measures. The first meaesure is to calculates the sum of the output grouped by date.

Sum = CALCULATE(SUM('Table'[OUTPUT]),FILTER(ALLSELECTED('Table'),[DATE YYYYMMDD]=MAX('Table'[DATE YYYYMMDD])))
the best production day = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Sum]= MAXX(ALL('Table'),[Sum])))

vstephenmsft_1-1646206922922.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @NZCraig ,

 

According to the table you provided, I first created a date column.

Date = Date(Left([DATE YYYYMMDD],4),Right(left([DATE YYYYMMDD],6),2),right([DATE YYYYMMDD],2))

vstephenmsft_0-1646206848548.png

 

Then create two measures. The first meaesure is to calculates the sum of the output grouped by date.

Sum = CALCULATE(SUM('Table'[OUTPUT]),FILTER(ALLSELECTED('Table'),[DATE YYYYMMDD]=MAX('Table'[DATE YYYYMMDD])))
the best production day = CALCULATE(MAX('Table'[Date]),FILTER(ALL('Table'),[Sum]= MAXX(ALL('Table'),[Sum])))

vstephenmsft_1-1646206922922.png

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thingsclump
Resolver V
Resolver V

Hey @NZCraig 

 

Can you please provide the input data as a table please. I belive the table that you have shown is result table.

 

Thanks

Thingsclump

www.thingsclump.com

Hi @Thingsclump . I can't provide the actual table, commercial stuff and all, but the data looks like as shown. with  one extra columns. A date column (not formated as a date data type), a period column showing 1- 48 for most days, except daylight saving days, and a output column showing the production output as received from SCADA for each period.

I think I might have worked out a way aournd it, by duplicating the table, grouping by date, aggregating SUM of output data, and MAX period number. I'm then filtering out the days where MAX period = 50.

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.

Top Solution Authors