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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
rajanimaddala
Helper II
Helper II

Drill down is not working

Hi,

I have calendar table and fact table. Both are related as fact.TransactionDate -> Calendar.Date

 

I have Week column in calendar table in the format Apr Week 1, Apr Week 2

 

Created measures

TotalSales = SUMX(FILTER(fact, [source] = "Sales"), [Sales Amount])

TotalSales_LY = CALCULATE([TotalSales], SAMEPERIODLASTYEAR(calendar[Date], -1, YEAR))

 

I have placed table visual and dragged [Week], [ProductGroup], TotalSales, TotalSales_LY

Perfectly working.

I have changed Table to Clustered column chart.

TotalSales is fine. TotalSales_LY is not showing correct result.

TotalSales_LY for week 1 is showing correct. TotalSales_LY for week 2 is showing as Week 1 value + week 2 value and vice versa

Why is it adding all weeks values cumulatively?

Wehn I drill down also the same issue. Adding entire months value for each productgroup even though I right click and drill down on Week 1

 

What is the issue?

 

Thanks in advance

 

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @rajanimaddala ,

 

Sorry for that, but we cannot reproduce your issue after  applying your formula on our sample table.

 

 

5.jpg

 

Does your chart similar with the sample we have shared? What is the relationship between your ‘fact table and ‘calendar’ table, “Many to one” or “one to one”? Does the calendar table only contain Continuous time value?

 

Could you please reproduce this issue on the sample we have shared?

 

BTW, pbix as attached.

 

Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi v-lid-msft,

 

I have exactly same relationship as in your pbix

 

Please see attached 2 screenshots

1. Week in Fact table which is correct

2. Week in calendar ta ble which is wrong

 

Week calculation is as below

CASE

WHEN DATEPART(DAY, [transaction Date]) BETWEEN 1 AND 7 THEN 'Week 1'

WHEN DATEPART(DAY, [transaction Date]) BETWEEN 8 AND 14 THEN 'Week 2'

WHEN DATEPART(DAY, [transaction Date]) BETWEEN 15 AND 21 THEN 'Week 3'

WHEN DATEPART(DAY, [transaction Date]) BETWEEN 22 AND 28 THEN 'Week 4'

ELSE 'Week 5'

END

 

Why is not working with Week in calendar tableWeek in Fact TableWeek in Fact TableWeek in Calendar TableWeek in Calendar Table

rajanimaddala
Helper II
Helper II

Sorry, just a correction to the TotalSales_LY formula.

 

*SAMEPERIODLASTYEAR(valendar[Date])

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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