The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 we only have 2 order numbers (001510529792R7 and 001510529792R6), I need the measurement to count only 1 time for each order.
My measurement x counts the number of orders that are repeated on a different day.
Thanks for help!
Solved! Go to Solution.
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!!
Hi @yforti ,
Have you solved your problem? If solved please mark the reply in this post which you think is helpful as a solution to help more others facing the same problem to find a solution quickly, thank you very much!
Best Regards,
Xianda Tang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
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!!
User | Count |
---|---|
13 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
24 | |
14 | |
13 | |
8 | |
8 |