cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
squintanar
New Member

Calculating Projected using max week number and Projected Annual against goal

I have one table that shows a date, that date's week number, category, and number of conversions for that entry

 

powerbi1.JPG

 

I am looking to sum up the conversions by Category, but with taking the Max week number, taking the sum of each category and dividing it by the max week number. Then using that number and multiplying it by 52 to get my projected annual number. **Note, my data has 2020 data, so I need the Max week number of 2021 or current year***

 

powerbi2.JPG

 

I also have another table-circled in red below-where the annual goal is listed for each category. I then want to take my Projected Number and show it against the projected annual number to show % attained against goal.

 

powerbi3.JPG

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User II
Super User II

Projected=VAR _maxdate=Max(sampledata[Dates]) VAR _total=CALCULATE(SUM(sampledata[Conversions]),DATESYTD(sampledata[Dates])) VAR _maxweek=CALCULATE(MAX(sampledata[WeekNumber]),sampledata[Dates]=_maxdate) REUTRN DIVIDE(_total,_maxweek)*52

View solution in original post

2 REPLIES 2
wdx223_Daniel
Super User II
Super User II

Projected=VAR _maxdate=Max(sampledata[Dates]) VAR _total=CALCULATE(SUM(sampledata[Conversions]),DATESYTD(sampledata[Dates])) VAR _maxweek=CALCULATE(MAX(sampledata[WeekNumber]),sampledata[Dates]=_maxdate) REUTRN DIVIDE(_total,_maxweek)*52

View solution in original post

Thank you very much. I can see what you wrote is doing, but would have never figured that out. I had to fix "REUTRN", but that is irrelevant to what you provided.

Helpful resources

Announcements
User Groups Public Preview

Join us for our User Group Public Preview!

Power BI User Groups are coming! Make sure you’re among the first to know when user groups go live for public preview.

March Update

Check it Out!

Click here to read more about the March 2021 Updates!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors