Forum Discussion

RonaldvdH's avatar
RonaldvdH
Post Patron
6 years ago
Solved

Button with a measure

Guys,

 

i was checking out the powerbi release video for match 2020 and saw this feature (maybe it was always there but i just saw it :))

The showed me that i can use a measure in a button which is very cool but the formula they displayed doesn't work for me

 

 
String_for_button = if(SELECTEDVALUE('Adres Taken'[AP gebied]; 0); == 0) ; "See product details";"See details for "&SELECTEDVALUE('Adres Taken'[AP gebied]))
 
The red part returns a syntax error but that is strange cause ive copied it directly from the video so what am i doing wrong ?
  • Anonymous's avatar
    Anonymous
    6 years ago

    HI RonaldvdH,

    You can try to use the following measure formula if it meets for your requirement:

    String_for_button =
    IF (
        SELECTEDVALUE ( 'Adres Taken'[AP gebied] ) <> BLANK ();
        "See product details";
        "See details for "
            & CONCATENATEX ( VALUES ( 'Adres Taken'[AP gebied] ); [AP gebied]; "," )
    )
    

    Regards,

    Xiaoxin Sheng

6 Replies

  • Try one with =

    String_for_button = if(SELECTEDVALUE('Adres Taken'[AP gebied]; 0); = 0) ; "See product details";"See details for "&SELECTEDVALUE('Adres Taken'[AP gebied]))
      • amitchandak's avatar
        amitchandak
        Super User

        RonaldvdH ,I tried it. I think if is closing at wrong place.

         

        Measure 5 = if(SELECTEDVALUE('Item'[Brand],0)==0,"See All brand", "See value for brand"&SELECTEDVALUE('Item'[Brand]))

         

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI RonaldvdH,

    You can try to use the following measure formula if it meets for your requirement:

    String_for_button =
    IF (
        SELECTEDVALUE ( 'Adres Taken'[AP gebied] ) <> BLANK ();
        "See product details";
        "See details for "
            & CONCATENATEX ( VALUES ( 'Adres Taken'[AP gebied] ); [AP gebied]; "," )
    )
    

    Regards,

    Xiaoxin Sheng

    • RonaldvdH's avatar
      RonaldvdH
      Post Patron

      Anonymous your solution did the trick it's just that i think ive marked the wrong post as a solution :):)