Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

EXCEPT ALLSELECTED

HI!!!!   I have a table with costumers and year, and i have to count the numbers of costumers accordingly the year selected in the slicer, and count the numbers of costumers that less than the year...
  • v-kkf-msft's avatar
    v-kkf-msft
    4 years ago

    Hi Anonymous ,

     

    Please try the following measure:

     

    INATIVO = 
    VAR selectyear = SELECTEDVALUE ( costumers[year purchase] )
    VAR _count =
        CALCULATE (
            COUNT ( costumers[Costumers] ),
            FILTER (
                ALL ( costumers[year purchase] ),
                costumers[year purchase] > selectyear
            )
        )
    RETURN
        IF ( selectyear <> BLANK (), _count )

                    

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.