Forum Discussion
yforti
Helper II
2 years agoHelp with dax formula
Hi guys! I need to create a measure that counts column "Repetidos" only once per order number (NroPedido2). Currently the measurement is repeated for all lines. As we can see in the image ...
- 2 years ago
HI yforti
Try this:
Repetidos = VAR UniqueOrdersPerDay = SUMMARIZE( iFrame, iFrame[NroPedido2], iFrame[DateSession - Copiar], "OrderCount", COUNTROWS(iFrame) ) VAR RepeatedOrders = SUMMARIZE( UniqueOrdersPerDay, [NroPedido2], "DaysCount", COUNTROWS(UniqueOrdersPerDay) ) RETURN COUNTROWS( FILTER( RepeatedOrders, [DaysCount] > 1 ) )If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
VahidDM
Super User
2 years agoHI yforti
Try this:
Repetidos =
VAR UniqueOrdersPerDay =
SUMMARIZE(
iFrame,
iFrame[NroPedido2],
iFrame[DateSession - Copiar],
"OrderCount", COUNTROWS(iFrame)
)
VAR RepeatedOrders =
SUMMARIZE(
UniqueOrdersPerDay,
[NroPedido2],
"DaysCount", COUNTROWS(UniqueOrdersPerDay)
)
RETURN
COUNTROWS(
FILTER(
RepeatedOrders,
[DaysCount] > 1
)
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!