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 Value Based on Slicer Selection

Hi Experts,

 

 I have Week_No & Year in my Slicer Selection. My data model have Data for last year in SalesData_2020  and Currentyear in SalesData_2021 along with other Dim tables. 

SAN2021_0-1612866806381.png

 

Problem I am facing

1) M-M join ITEM table 

2) Need to calculate LYWTD, WTD.LY,PY

 

please help.

 

 

SAN2021_0-1612866506500.png

1 ACCEPTED SOLUTION

@Anonymous , Try like

Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

@amitchandak ,

 

Thanks for sharing the gem of a document. i guess LastYear Week is missing. suppose if my filter is send on week 3. it should give me sales for ly week and this year week.

@Anonymous , Try like

Last year Week= CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Week Rank]=(max('Date'[Week Rank]) -52)))

Anonymous
Not applicable

@amitchandak  It working now Thanks.  Is anyway I can solve the M:M Issue.

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.