Forum Discussion

faheem_Latif_BI's avatar
3 years ago
Solved

need help

Hi life Gurus,

 

what systax errror in this?

 

[countryName] =

VAR B = DISTINCTCOUNT('VW_UserConfig'[countryName])
,FILTER('VW_UserConfig','VW_UserConfig'[EmailAddress] == USERPRINCIPALNAME()))
RETURN
B

  • This is working for me thanks any way:


    [Name] = CALCULATETABLE (
    VALUES ( 'VW_UserConfig'[countryName] ),
    'VW_UserConfig'[emailaddress] = USERPRINCIPALNAME ())

2 Replies

  • Hi,

    I am not sure how your desired outcome looks like, but please try the below.

     

     

    countryName =
    VAR B =
        CALCULATE (
            DISTINCT ( 'VW_UserConfig'[countryName] ),
            FILTER (
                'VW_UserConfig',
                'VW_UserConfig'[EmailAddress] == USERPRINCIPALNAME ()
            )
        )
    RETURN
        B
    

     

    Or,

     

    countryName =
    VAR B =
        CALCULATE (
            DISTINCTCOUNT ( 'VW_UserConfig'[countryName] ),
            FILTER (
                'VW_UserConfig',
                'VW_UserConfig'[EmailAddress] == USERPRINCIPALNAME ()
            )
        )
    RETURN
        B
    

     

  • This is working for me thanks any way:


    [Name] = CALCULATETABLE (
    VALUES ( 'VW_UserConfig'[countryName] ),
    'VW_UserConfig'[emailaddress] = USERPRINCIPALNAME ())