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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.