I think the solution requires me to use COUNTD, but at each individual data row level...
@Edwin Choo
I guess you want to count how many orders have 1 product, 2 products, etc.
If this is the case, you can use:
Number of Products Per Order
{FIXED [Order ID]:COUNTD([Product Name])}Then you can convert to Dimension:
Finally, you can add the distinct count of order ID:
This is a similar case of the first one in https://www.tableau.com/blog/LOD-expressions
Finally, if you want your dimension filters to affect the FIXED calc, then you would need to add them to the context. So, if you have a pill in the filter shelf, then right click on the pill in the filter shelf and add to context. This way, the filter will be calculated before the fixed calc:
If this post resolves the question, would you be so kind to "Select as Best"?. This will help other users find the same answer/resolution and help community keep track of answered questions. Thank you.
Regards,
Diego Martinez
Tableau Visionary and Forums Ambassador