Forum Discussion
Anonymous
4 years agoNot applicable
Promedio en powerbi
Buenas tardes, necesito ayuda con un problema en powerbi, cuento con la siguiente tabla "cliente, fecha de visita" Cli1, 01/01/2022 Cli1, 02/01/2022 Cli 2, 01/01/2022 Cli 2, 02/01/2022 Cli 2, 0...
- Anonymous4 years ago
Hi Anonymous ,
Please try:
average = CALCULATE ( COUNTROWS ( 'Table' ) / DISTINCTCOUNT ( 'Table'[Client] ), FILTER ( 'Table', YEAR ( [date of visit] ) = YEAR ( MAX ( 'Table'[date of visit] ) ) && MONTH ( [date of visit] ) = MONTH ( MAX ( 'Table'[date of visit] ) ) ) )Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
4 years agoNot applicable
Hi Anonymous ,
Please try:
average =
CALCULATE (
COUNTROWS ( 'Table' ) / DISTINCTCOUNT ( 'Table'[Client] ),
FILTER (
'Table',
YEAR ( [date of visit] ) = YEAR ( MAX ( 'Table'[date of visit] ) )
&& MONTH ( [date of visit] ) = MONTH ( MAX ( 'Table'[date of visit] ) )
)
)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.