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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

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
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

May 2025 Monthly Update

Fabric Community Update - May 2025

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