Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Dax Creating baseline value measure

Hi there everyone. I have a problem I have been trying to solve. I am a newbie so please bear with me

 

The problem involves writing baseline values as a Dax measure,

  • I have to create aโ€œ baseline valueโ€ measure for hours worked for each location.

 

  • Such that: the baseline value is based on the average of all "actual hours worked" per location. (This Value must remain constant regardless of the date,

 

  • Option b for a baseline:

each week baseline should be based on the average hours of 3 weeks prior, such that it dynamically changes as time goes on.

 

I have the following sample table of work hours below:

 

Screen Shot 2021-03-03 at 9.32.35 PM.png

 

Just a similar example of what I am trying to achieve in a visual form

Screen Shot 2021-03-03 at 5.35.44 PM.png

โ€ƒ

I would appreciate any help I can get on this. Thank you all. 

 

 

 

 

3 REPLIES 3
rfigtree
Resolver III
Resolver III

you might have to tweak depending on how your data model is set up but this might give you a starting point.

mbaseline:=
var _MaxDate=MIN(Table1[date])
var _MinDate= _MaxDate-21
return 
     CALCULATE(AVERAGE(Table1[actual]),
               FILTER(all(Table1[date]),
                      Table1[date]>_MinDate && Table1[date]<=_MaxDate
                     )
               )

rfigtree_0-1614837853037.png

 

 

Anonymous
Not applicable

Hi there, Thanks for your input, and will try this out. Also, I would like to know how I can make an overall static baseline value for each location so that it remains unaffected by the date value changes.

rfigtree
Resolver III
Resolver III

assume you mean there is another table with the static values.

easiest thing would be to  join the two tables together.

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)