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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors