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
aabati
Frequent Visitor

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

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community 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] * [%]

 

13.JPG

 

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

 

 

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

View solution in original post

2 REPLIES 2
v-lili6-msft
Community Support
Community 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] * [%]

 

13.JPG

 

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

 

 

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

Thanks a lot ! it worked as expected.

Rgs

A.

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.