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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
smtiwari
Helper I
Helper I

DrillThrough Button with single value data

Hi All,

I am stuck with a problem when using drill through buttons . I am using below DAX for my drillthrough-button , its disabled initially and gets enabled upon selection on a data point.

 
Button = IF(
             SELECTEDVALUE('Table'[Data],0)==0,"Disabled", SELECTEDVALUE('Table'[Data]))
 
 

Problem1.PNG

 
Problem2.PNG
 
 
 
 
 
 
This works fine when multiple values are available for the visual, however it doesnt work when we
have single value on the visual (due to lack of data)
I want this to show the disabled text instead of Company A:
Problem3.PNG
 
What am I missing here?
1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @smtiwari 

It’s my pleasure to answer for you.

According your description, I think you can modify your measure to meet your requirement..

Like this:

Button =
IF (
    ISFILTERED ( Table1[data] ),
    IF (
        SELECTEDVALUE ( 'Table1'[data], 0 ) == 0,
        "Disabled",
        SELECTEDVALUE ( Table1[data] )
    ),
    "Disabled"
)

v-janeyg-msft_0-1603073377533.png

If it doesn’t solve your problem, please feel free to ask me.

Best Regards

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-janeyg-msft
Community Support
Community Support

Hi, @smtiwari 

It’s my pleasure to answer for you.

According your description, I think you can modify your measure to meet your requirement..

Like this:

Button =
IF (
    ISFILTERED ( Table1[data] ),
    IF (
        SELECTEDVALUE ( 'Table1'[data], 0 ) == 0,
        "Disabled",
        SELECTEDVALUE ( Table1[data] )
    ),
    "Disabled"
)

v-janeyg-msft_0-1603073377533.png

If it doesn’t solve your problem, please feel free to ask me.

Best Regards

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

@v-janeyg-msft: Many thanks for your help, solution works 🙂

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @smtiwari ,

 

SELECTEDVALUE returns the value when there’s only one value in the specified column, otherwise returns the alternate result.

So you only interpret the result data and not the filter/action itself.

I do not know any other solution, but it works as expected.

 

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors