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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Calculate and filter

Hi,

So I've a measure that is telling me what current week in Data i have

Actual WW = CALCULATE(MAX(WholeData[WW - Number]),WholeData[Year]="2019")

And then i want to create measure that will be last year YTD 

2018 YTD = CALCULATE(SUM(WholeData[Semi-Net Revenue]),FILTER(WholeData,(WholeData[WW - Number]<=[Actual WW])&& WholeData[Year]="2018"))
and it's returing blank
I found out that "Actual WW" is returning 0 (only in 2018 YTD) but if i will change WholeData[Year]="2018" to "2019" then it does return correct number. 
Any solution? 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

I found solution:

 

2018 YTD =
VAR WWNumber = [Actual WW]
Return
CALCULATE(
SUM(WholeData[Semi-Net Revenue]),
(WholeData[WW - Number]<=WWNumber),
WholeData[Year]="2018"
)

View solution in original post

1 REPLY 1
Anonymous
Not applicable

I found solution:

 

2018 YTD =
VAR WWNumber = [Actual WW]
Return
CALCULATE(
SUM(WholeData[Semi-Net Revenue]),
(WholeData[WW - Number]<=WWNumber),
WholeData[Year]="2018"
)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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