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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
sobhik_saha_98
Frequent Visitor

Ouput the original value when a single option from slicer is selected, Ouput "NA" when multiple.

So I am using a table visual which has multiple columns, There is this 1 column where I need to show the original value when a single option is selected and "NA" when there is a multi select in the table itself.

 

This is what should happen on single select-->>

col_headercol_headercol_headerTarget_Col
......0.00
......0.81
......0.92

 

This is what should happen on Multi select-->>

col_headercol_headercol_headerTarget_Col
......NA
......NA
......NA

 

Need to complete this ASAP. Any help is appreciated. Cheers.

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @sobhik_saha_98 ,

According to your description, I create a sample.

vkalyjmsft_0-1659101602835.png

Put Column1 in a slicer, then create a measure to show Column2 when there is a single option is selected in the slicer otherwise display NA. Here's my solution, create a measure(not calculated column because it can't change by the slicer selection).

Measure =
IF (
    COUNTROWS ( ALLSELECTED ( 'Table'[Column1] ) ) = 1,
    MAX ( 'Table'[Column2] ),
    "NA"
)

Then get the result.

vkalyjmsft_1-1659101869693.png

vkalyjmsft_2-1659101887430.png

You may need to tweak the formula a bit depending on your sample, but this is the basic idea.

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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-yanjiang-msft
Community Support
Community Support

Hi @sobhik_saha_98 ,

According to your description, I create a sample.

vkalyjmsft_0-1659101602835.png

Put Column1 in a slicer, then create a measure to show Column2 when there is a single option is selected in the slicer otherwise display NA. Here's my solution, create a measure(not calculated column because it can't change by the slicer selection).

Measure =
IF (
    COUNTROWS ( ALLSELECTED ( 'Table'[Column1] ) ) = 1,
    MAX ( 'Table'[Column2] ),
    "NA"
)

Then get the result.

vkalyjmsft_1-1659101869693.png

vkalyjmsft_2-1659101887430.png

You may need to tweak the formula a bit depending on your sample, but this is the basic idea.

I attach my sample below for your reference.

 

Best Regards,
Community Support Team _ kalyj

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

sobhik_saha_98
Frequent Visitor

Can you share me the code or something. Not heard of it. Will be a great help. Thanks for the reply

 

daXtreme
Solution Sage
Solution Sage

Just use the HASONEFILTER function to make decisions in your DAX code.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.