Forum Discussion
Average
- 3 years ago
Please try this one instead.
Avg Measure = AVERAGEX ( VALUES ( T4[CoWComp] ), [Site Visits/day] )Pat
Please try this measure expression. Replace T4 with your actual table name.
Avg Measure =
AVERAGEX (
VALUES ( T4[CoWComp] ),
CALCULATE ( AVERAGEX ( t4, T4[Site Visits] / T4[Workdays] ) )
)Pat
Hi Pat, thanks for your response,
When you get a gap, can you please tell me if Im doing something wrong here,
These are the results I'm getting, which are not correct.
| CoWComp | Avg Site Visits/Day |
| Company 1 | 1 |
| Company 2 | 1 |
| Company 3 | 1 |
Thanks for your time,
Santiago Torres
- SantiagoTorres3 years agoHelper I
Hi Pat ppm1 , thanks for your response,
When you get a gap, can you please tell me if Im doing something wrong here,
Avg Site Visits/Day = AVERAGEX( VALUES( DimCoWCom[CoWComp] ),CALCULATE( AVERAGEX('2. Observations', [Site Visits] / [Workdays] ) ) )These are the results I'm getting, which are not correct.
CoWComp Avg Site Visits/Day Company 1 1 Company 2 1 Company 3 1 Thanks for your time,
Santiago Torres
- ppm13 years agoSolution Sage
Looks like you are referencing measures in your inner AVERAGEX, while I used columns. Please switch to column references and it should work.
Pat
- SantiagoTorres3 years agoHelper I
Hi Pat ppm1, that's correct. Can you please elaborate a bit more? As you can see in my first post, these two DAX measures are coming from the data I got from previous years (massive table), so I dont have two custom columns. Hope this makes sense to you.
Site Visits = COUNTROWS(SUMMARIZE('3. CoW Productivity',DimProject[Project Number],'Calendar'[Date], DimCoWInsp[CoWInsp]))Workdays = COUNTROWS(SUMMARIZE('3. CoW Productivity','Calendar'[Date]))Thanks,