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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

Reply
AllanBerces
Post Prodigy
Post Prodigy

Max Week

Hi good day,

Can anyone help me to amend my calculated column, I want my **bleep** Earned Column up to current week only 

**bleep** Earned = VAR CurrentDate = 'Table#01'[Week No.]

                              VAR CurrentSubTask = 'Table#01' [Test 2024]

                              VAR Filteredtable = FILTER('Table#01', 'Table#01' [Week No.]<=CurrentDate && ''Table#01' '[Test 2024] = CurrentSubTask)

 

                              return

                                 IF(''Table#01' '[Week No.],

 

                              CALCULATE(SUM(''Table#01' '[Weekly_Earned]), Filteredtable))

 

AllanBerces_1-1725435310844.png

 

Thank you

4 REPLIES 4
bhanu_gautam
Super User
Super User

@AllanBerces , Try this

 

**bleep** Earned =
VAR CurrentWeek = 'Table#01'[Week No.]
VAR CurrentYear = 'Table#01'[Year]
VAR CurrentSubTask = 'Table#01'[Test 2024]
VAR CurrentWeekNum = WEEKNUM(TODAY())
VAR CurrentYearNum = YEAR(TODAY())
VAR FilteredTable = FILTER(
'Table#01',
('Table#01'[Year] < CurrentYearNum) ||
('Table#01'[Year] = CurrentYearNum && 'Table#01'[Week No.] <= CurrentWeekNum) &&
'Table#01'[Test 2024] = CurrentSubTask
)

RETURN
IF(
'Table#01'[Year] < CurrentYearNum ||
('Table#01'[Year] = CurrentYearNum && 'Table#01'[Week No.] <= CurrentWeekNum),
CALCULATE(SUM('Table#01'[Weekly_Earned]), FilteredTable)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi @bhanu_gautam thank you but still the result not the one I required.

AllanBerces_0-1725438214886.png

Thank you

bhanu_gautam
Super User
Super User

@AllanBerces , Try below mentioned DAX

 

**bleep** Earned =
VAR CurrentDate = 'Table#01'[Week No.]
VAR CurrentSubTask = 'Table#01'[Test 2024]
VAR Filteredtable = FILTER('Table#01', 'Table#01'[Week No.] <= CurrentDate && 'Table#01'[Test 2024] = CurrentSubTask)

RETURN
IF(
'Table#01'[Week No.] <= CurrentDate,
CALCULATE(SUM('Table#01'[Weekly_Earned]), Filteredtable)
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






HI @bhanu_gautam thank you for the reply but same result. b the way I dont have daily date only Week No. and Year

AllanBerces_0-1725437309607.png

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.