Forum Discussion
zibster
6 years agoHelper III
Calculating daily Sales
Hi, I am trying to calculate daily projection from the total weekly amount, the %ByDayForTheWeek is a calculated value. Below is an example of how I would do this in excel. Please help
- 6 years ago
Hi zibster ,
We can try to create a calculated column in “Split By Day Table” Table using following dax to meet your requirement:
Ounput = [%ByDayForTheWeek] * CALCULATE ( SUM ( 'Sales Table'[SalesProj] ), FILTER ( 'Sales Table', 'Sales Table'[Facility] = EARLIER ( 'Split By Day Table'[Facility] ) && 'Sales Table'[Department] = EARLIER ( 'Split By Day Table'[Department] ) && 'Sales Table'[WeekID] = EARLIER ( 'Split By Day Table'[WeekID] ) ) )If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
v-lid-msft
6 years agoCommunity Support
Hi zibster ,
We can try to create a calculated column in “Split By Day Table” Table using following dax to meet your requirement:
Ounput =
[%ByDayForTheWeek]
* CALCULATE (
SUM ( 'Sales Table'[SalesProj] ),
FILTER (
'Sales Table',
'Sales Table'[Facility] = EARLIER ( 'Split By Day Table'[Facility] )
&& 'Sales Table'[Department] = EARLIER ( 'Split By Day Table'[Department] )
&& 'Sales Table'[WeekID] = EARLIER ( 'Split By Day Table'[WeekID] )
)
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
zibster
6 years agoHelper III
This was very helpful
Thanks