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
icdns
Post Patron
Post Patron

CALCULATE WEEKLY RANGE AVERAGE

Hello,

 

Would like to ask for your help in getting and show the "Weekly Average" per assigned manual and assigned fieldman in the line graph: 

icdns_0-1595585727376.png

For my date range in the X axis, im using this formula': 

DATE_RANGE =
var _mindate =
CALCULATE(
MIN('Date'[FullDateAlternateKey]),
FILTER(
ALL('DATE'),
'Date'[Year]=EARLIER('DATE'[Year])&&
'DATE'[Week of Year]=EARLIER('DATE'[Week of Year])
)
)
var _maxdate =
CALCULATE(
MAX('DATE'[FullDateAlternateKey]),
FILTER(
ALL('DATE'),
'DATE'[Year]=EARLIER('DATE'[Year])&&
'DATE'[Week of Year]=EARLIER('DATE'[Week of Year])
)
)
return
_mindate&" - "&_maxdate

For my Y axis (line graph), im using these measures: 
Contractor_Assigned_MANUAL = CALCULATE(DISTINCTCOUNT(TEAM[NUM]),TEAM[IN_FIELDMAN] = "NO",TEAM[VENDOR_ID] <> "MECOVENDOR")
 
Contractor_Assigned_FIELDMAN = CALCULATE(DISTINCTCOUNT(TEAM[NUM]),TEAM[IN_FIELDMAN] = "YES")
 
Thank you in advance! 

 

3 REPLIES 3
amitchandak
Super User
Super User

Hello,

 

For example, i have data, I have a matrix table where in it displays the total fieldman assigned in Manual and fieldman for that week range. 

icdns_0-1595602483066.png

 

So in my line graph, I wanted to show the average fieldman per assigned manual and assigned fieldman in my line graph per WEEK RANGE. 

 

This is my line graph: 

 

icdns_1-1595602657680.png

X axis shows my week range and Y axis shows the percentage. 

The points are the average. 

 

Thank you. 

HI @icdns,

Please share some dummy data that similar to your raw table structure to help us clarify your data structure and test coding formula on your sample data. It is hard to direct coding formula on visualization records.

How to Get Your Question Answered Quickly 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

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.