Forum Discussion
PieroPinzone95
3 years agoFrequent Visitor
FILTERED DISTINTCOUNT
Hi guys, i want to calculate a distintcount as shown in the picture but it give me an error because i'm comparing a "text" value with an "integer" one ... i don't understand well... the filter i'm using is a integer... what i should do?
2 Replies
- Alex_Sawdo
Resolver II
- Is the column data type you're trying to filter on a text column or a number column? This would affect the filtering heavily.
- I'd recommend that instead of adding in your filter statement as a regular statement wrap it in it's own FILTER function.
- Since you have your 2 and 3 values within double-quotes, DAX will treat these as strings and not integers. This is probably why it isn't working, try removing the quotes.
- FreemanZ
Super User
try like:
Flotte Kinto =
CALCULATE(
DISTINCTCOUNT(VW_Polizze[IdPolizza]),
VW_polizze[IdProdotto] in {2, 3}
)