Forum Discussion
Problem with Count
- 5 years ago
Hi FrankAT,
Thanks for the message. However, I am not trying to count the delivery days. I want to count the product that have more than one delivery days value. For instance, Product A has 2 values in delivery days (i.e. 60 and 90), while Product B has only 1 value in delivery days (i.e. 60).
Update: We can ignore the months columns as I can see that it is causing some comfusion.
- FrankAT5 years ago
Community Champion
Hi Anonymous
is this what you are looking for:
With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut) - mahoneypat5 years ago
Microsoft Employee
Please try an expression like this
Products with >1 Dates =
COUNTROWS (
FILTER (
VALUES ( table[product] ),
CALCULATE (
DISTINCTCOUNT ( table[delivery days] )
) > 1
)
)Regards,
Pat
- Anonymous5 years agoNot applicable
Hi Pat,
Thanks for your effort. The measure was able to calculate the sum of Products with more than one delivery days value, however, I could not identify the products that were counted when i used the formula. This is only a dummy data, my original data has thousands of rows, and I want to know both the number of products and the name of products that has more than one delivery days value. It seems like an easy task but surprisingly it is more complicated that it looks.
Do you have any other ideas? I appreciate your help.
- mahoneypat5 years ago
Microsoft Employee
To do that, you could make a table visual with your Product column and this measure. Products with only 1 delivery day value would be blank and get filtered out from the visual.
Count if Multiple =
VAR deldays =
DISTINCTCOUNT ( Table[Delivery Days] )
RETURN
IF (
deldays > 1,
deldays,
BLANK ()
)Regards,
Pat