Forum Discussion
SantiagoTorres
3 years agoHelper I
Average
Hi All, hope you're well, Can you please help me with this? I'm trying to get the average site/visits per company, and I got the following measures. Site Visits = COUNTROWS(SUMMARIZE('3. Co...
- 3 years ago
Please try this one instead.
Avg Measure = AVERAGEX ( VALUES ( T4[CoWComp] ), [Site Visits/day] )Pat
SantiagoTorres
3 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
ppm1
3 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,- ppm13 years agoSolution Sage
Please try this one instead.
Avg Measure = AVERAGEX ( VALUES ( T4[CoWComp] ), [Site Visits/day] )Pat