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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
tqn626
Frequent Visitor

Sales/Store/Day

I'm having some trouble calculating Sales/Store/Day.

 

This is how i wrote the code which i'm sure is the incorrect way. It works when looking week level but when i go to individual dates it's incorrect.

 

 

Weeks = COUNTA('Date Table'[Date])/7

U/S/W = [Unit Sales]/[Stores]/[Weeks]

U/S/D = [Unit Sales]/[Stores]/[Weeks]/7

Stores = CALCULATE(DISTINCTCOUNT(DimStore_List[STORE]),FILTER('Daily Data','Daily Data'[Net_Sales]>0))

Unit Sales = SUM('Daily Data'[Unit_Sales])

 

 

2 REPLIES 2
lbendlin
Super User
Super User

Does your [Unit_Sales] data actually have day level granularity? Or do you only want to divide the weekly numbers by 7 ?

That's is actually the tricky part. My data is a combination of day level and week level. Some day will have one date that represents the entire week and other would have each day.

 

For background context this model is a combination of multiple Retailer Data. I shown the days here, but we actually only look at the data by week but now want to see Unit Sales per Store Per Day.

 

Full week in one day

 

Full week in one dayFull week in one day

Daily day

Daily DataDaily Data

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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