Forum Discussion
Oros
2 years agoPost Prodigy
DistincCount with Filter
Hello, I have a measure that works using DISTINCOUNTNOBLANK. How do you add a filter to this measure, for example, ONLY distinct count "the product number that starts in number 1 and 2"? Thanks...
- 2 years ago
The solution will works. Please try copy it carefully. Then click accept solution. Thanks.
Answer =VAR tempfile = FILTER('yourtable',NOT LEFT('yourtable'[PRODUCT NUMBER],1) IN {"2","3"})RETURNCALCULATE(DISTINCTCOUNT('yourtable'[PRODUCT NUMBER]),tempfile)
parry2k
2 years agoSuper User
speedramps great advice and I also have a small advice for you. I hope don't mind. When you paste a DAX or M code, instead of pasting it as text, use the insert/edit code sample button on the editor and paste the code there. It differentiates the code from the rest of the text/message.