Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
RonaldvdH
Post Patron
Post Patron

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 ?
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

6 REPLIES 6
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

@v-shex-msft your solution did the trick it's just that i think ive marked the wrong post as a solution :):)

amitchandak
Super User
Super User

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 already tried that but unfortunately the error remains the same

@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]))

 

@amitchandak still the same result, ive tried changing the ( or ) but the problem is stil the syntax of the ==

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.