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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
scolino
Frequent Visitor

DAX:Expression in Boolean

I am trying to calculate as sum of the WeeklyPlan column with only data that has a year of 2017 and a specified week num. Below is the formula I am using:

 

LastWeekPlan = CALCULATE(sum('Weekly'[Weekly Plan]),Weekly[Year]=2017,Weekly[WeekNum]=(WEEKNUM(2/13/2017,1)))

 

The formula works if I add a stagnant number in the Weekly[WeekNum]=... boolean, but when I add the WEEKNUM expression, the formula doesn not work.  I will eventually be replacing the date with today() expression.

 

Any ideas why my logic will not work?

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Use WEEKNUM(DATE(2017,2,13),1)



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

@scolino

 

Hi,

 

Could you please tell me if your problem is solved? You can mark the right answer to help others if it's convenient for you.

 

Best Regards!
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Community Champion
Community Champion

Use WEEKNUM(DATE(2017,2,13),1)



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors