Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

slicers , Disconnected Slicer

Hello everyone,

 

I have Slicer (Profile)  with list  if i select Administrator or SubAdministrator or Both from profile then Card visual with num 43 must change it will replace with another card visual which has same number but name is different. 

 

  • Hi Anonymous 

    Try this measure

    Measure_2 = 
    VAR profile_type = VALUES ( 'MSP ResourceCenter'[Profile] )
    VAR profile_number = COUNTROWS ( profile_type )
    VAR profile_type_concat = CONCATENATEX ( profile_type, [Profile], "," )
    RETURN
        SWITCH (
            profile_number,
            1,
                IF (
                    profile_type = "Administrator" || profile_type = "SubAdministrator",
                    "Count of Optimised Licneses",
                    "Worngly Assigned Licenses"
                ),
            2,
                IF (
                    profile_type_concat = "Administrator,SubAdministrator" || profile_type_concat = "SubAdministrator,Administrator",
                    "Count of Optimised Licneses",
                    "Worngly Assigned Licenses"
                ),
            "Worngly Assigned Licenses"
        )
    

     

    In your measure, SELECTEDVALUE returns alternative value when multiple values are selected in the slicer, so it will not return the correct value when both of Administrator and SubAdministrator are selected.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

3 Replies

  • v-jingzhang's avatar
    v-jingzhang
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    Try this measure

    Measure_2 = 
    VAR profile_type = VALUES ( 'MSP ResourceCenter'[Profile] )
    VAR profile_number = COUNTROWS ( profile_type )
    VAR profile_type_concat = CONCATENATEX ( profile_type, [Profile], "," )
    RETURN
        SWITCH (
            profile_number,
            1,
                IF (
                    profile_type = "Administrator" || profile_type = "SubAdministrator",
                    "Count of Optimised Licneses",
                    "Worngly Assigned Licenses"
                ),
            2,
                IF (
                    profile_type_concat = "Administrator,SubAdministrator" || profile_type_concat = "SubAdministrator,Administrator",
                    "Count of Optimised Licneses",
                    "Worngly Assigned Licenses"
                ),
            "Worngly Assigned Licenses"
        )
    

     

    In your measure, SELECTEDVALUE returns alternative value when multiple values are selected in the slicer, so it will not return the correct value when both of Administrator and SubAdministrator are selected.

     

    Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as the solution to help other members find it.

  • Anonymous's avatar
    Anonymous
    Not applicable

    i have created below measure 

    Measure 2 =
    VAR PROFILE_TYPE_ = SELECTEDVALUE('MSP ResourceCenter'[Profile],"Count of Optimised Licneses")
    Return
    IF(OR(PROFILE_TYPE_ = "Administrator",PROFILE_TYPE_ = "SubAdministrator"),"Count of Optimised Licneses","Worngly Assigned Licenses")
     
    This is workin i make single single selection i.e. either Administrator or SubAdministrator i select need it not giving the value