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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
JeevanMallya
Resolver II
Resolver II

Filter rows in query editor up to current Week

I have a Table where i doing Fill down Null values for Reported_Cummulative and Closed_Cummulative for All the Future Weeks.

But i would like to filter data untill Current Week Rather than doing it manually.

The Table looks like below. Need help in defining filter to show data untill Current Week.

PROJECT_KEYYEARWEEK_NUMREPORTED_CUMMULATIVECLOSED_CUMMULATIVE
ABC2022100
ABC2022200
ABC2022300
ABC2022400
ABC2022500
ABC2022600
ABC2022700
ABC2022800
ABC2022900
ABC20221000
ABC20221100
ABC20221200
ABC20221300
ABC20221400
ABC20221500
ABC20221600
ABC20221700
ABC20221800
ABC20221900
ABC20222000
ABC20222100
ABC20222200
ABC20222300
ABC20222400
ABC20222500
ABC20222600
ABC20222700
ABC20222800
ABC20222900
ABC20223000
ABC20223100
ABC20223200
ABC20223300
ABC20223400
ABC20223500
ABC20223600
ABC20223700
ABC20223800
ABC20223900
ABC20224000
ABC20224100
ABC20224200
ABC20224300
ABC20224400
ABC20224510
ABC20224640
ABC20224790
ABC202248200
ABC202249340
ABC202250381
ABC202251461
ABC202252512
ABC202253522
ABC20231522
ABC20232543
ABC20233587
ABC20234638
ABC20235638
ABC20236658
ABC202376914
ABC202387116
ABC202397218
ABC2023107622
ABC2023117723
ABC2023128226
ABC2023138328
ABC2023148729
ABC2023158932
ABC2023169633
ABC20231710338
ABC20231810340
ABC20231910945
ABC20232011249
ABC20232111651
ABC20232211956
ABC20232312057
ABC20232412163
ABC20232512568
ABC20232612669
ABC20232712674
ABC20232812676
ABC20232912878
ABC20233012883
ABC20233112884
ABC20233212985
ABC20233313288
ABC20233413389
ABC20233513391
ABC20233613393
ABC20233713495
ABC20233813496
ABC20233914096
ABC202340146100
ABC202341146103
ABC202342147105
ABC202343147106
ABC202344148109
ABC202345148109
ABC202346149110
ABC202347152113
ABC202348153117
ABC202349155122
ABC202350158123
ABC202351160124
ABC202352161126
ABC202353161126
ABC20241161127
ABC20242161127
ABC20243161128
ABC20244163128
ABC20245164129
ABC20246164129
ABC20247164129
ABC20248164129
ABC20249164129
ABC202410164129
ABC202411164129
ABC202412164129
ABC202413164129
ABC202414164129
ABC202415164129
ABC202416164129
ABC202417164129
ABC202418164129
ABC202419164129
ABC202420164129
ABC202421164129
ABC202422164129
ABC202423164129
ABC202424164129
ABC202425164129
ABC202426164129
ABC202427164129
ABC202428164129
ABC202429164129
ABC202430164129
ABC202431164129
ABC202432164129
ABC202433164129
ABC202434164129
ABC202435164129
ABC202436164129
ABC202437164129
ABC202438164129
ABC202439164129
ABC202440164129
ABC202441164129
ABC202442164129
ABC202443164129
ABC202444164129
ABC202445164129
ABC202446164129
ABC202447164129
ABC202448164129
ABC202449164129
ABC202450164129
1 ACCEPTED SOLUTION
PijushRoy
Super User
Super User

Hi @JeevanMallya 

I have created one calculated column in Power Query to dynamic filter
Please update the code as per your requirement

PijushRoy_0-1706984643075.png

 

= if [WEEK_NUM] > Date.WeekOfYear(DateTime.LocalNow()) then "Greater Than Current Week" else "Less Than Current Week"

 


If your requirement is solved, please make sure to MARK AS SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





View solution in original post

3 REPLIES 3
JeevanMallya
Resolver II
Resolver II

Thank you very much

 

You are welcome




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





PijushRoy
Super User
Super User

Hi @JeevanMallya 

I have created one calculated column in Power Query to dynamic filter
Please update the code as per your requirement

PijushRoy_0-1706984643075.png

 

= if [WEEK_NUM] > Date.WeekOfYear(DateTime.LocalNow()) then "Greater Than Current Week" else "Less Than Current Week"

 


If your requirement is solved, please make sure to MARK AS SOLUTION ✔️ and help other users find the solution quickly. Please hit the LIKE 👍 button if this comment helps you.

Thanks
Pijush
Linkedin




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

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

Jan NL Carousel

Fabric Community Update - January 2025

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