Forum Discussion
create a new measure
Dear All I have a measure that is my daily sales at daily level and the Budget at weekly level. I'd like to create a new measure (Budget Daily) )that is calculated as portion of the weekly budget using the daily sales %
Day Sales Portion% new Measure
Sun 100 12.7% 126.6
Mon 120 15.2% 151.9
Tue 160 20.3% 202.5
Wed 120 15.2% 151.9
Thu 80 10.1% 101.3
Fri 90 11.4% 113.9
Sat 120 15.2% 151.9
Tot 790
Weekly Bidget 1000
Many thanks for your help Antonio
HI, aabati
After my test, there should be a date column in the data table.
Then you could try these steps as below:
Step1:
Add a year week No for date table
YEAR WEEK No = YEAR(Table1[Date])*100+WEEKNUM(Table1[Date],1)
Step2:
create the Measure
Sales measure = CALCULATE(SUM(Table1[Sales])) % = [Sales measure]/CALCULATE([Sales measure],ALLEXCEPT(Table1,Table1[YEAR WEEK No]))
for your new measure (Budget Daily) ) by this formula
new Measure = [Weekly Bidget] * [%]
If it is not your case, please share some data sample with the Complete data structure and expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Best Regards,
Lin
2 Replies
- v-lili6-msftCommunity Support
HI, aabati
After my test, there should be a date column in the data table.
Then you could try these steps as below:
Step1:
Add a year week No for date table
YEAR WEEK No = YEAR(Table1[Date])*100+WEEKNUM(Table1[Date],1)
Step2:
create the Measure
Sales measure = CALCULATE(SUM(Table1[Sales])) % = [Sales measure]/CALCULATE([Sales measure],ALLEXCEPT(Table1,Table1[YEAR WEEK No]))
for your new measure (Budget Daily) ) by this formula
new Measure = [Weekly Bidget] * [%]
If it is not your case, please share some data sample with the Complete data structure and expected output. You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading.
Best Regards,
Lin
- aabatiFrequent Visitor
Thanks a lot ! it worked as expected.
Rgs
A.