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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors
Top Kudoed Authors