Forum Discussion

aabati's avatar
aabati
Frequent Visitor
7 years ago
Solved

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 usi...
  • v-lili6-msft's avatar
    7 years ago

    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