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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

DAX- How to return selected measure values in a table?

Hi All,

 

----please refer below picture------

I am trying to create a measure that, if I select anything from Product Name filter visual, it will return (%)PRODUCT Measure, if there isnt anything selected in Product Name filter visual then it will return (%)SUB-PRODUCT Measure.  

 

Below case, I tried to use ISFILTER Function like below;

Measure =
        IF (ISFILTERED(PRODUCT[PRODUCT_NAME]),(%)PRODUCT,(%)SUB-PRODUCT) 
 

 

WHynotbi61_0-1659630451445.png

 

And, it didnt work.  I didnt select anything from filter visual, but it is returning (%)PRODUCT. 

 

Note: I need to keep PRODUCT NAME in the table

 

Do you have any solution?

 

Thank you!

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Product name is used in visual, so isfiltered is true because of that

 

try like

var _is = calculate(ISFILTERED(PRODUCT[PRODUCT_NAME]), allselected())

return

IF (_is ,(%)PRODUCT,(%)SUB-PRODUCT)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Product name is used in visual, so isfiltered is true because of that

 

try like

var _is = calculate(ISFILTERED(PRODUCT[PRODUCT_NAME]), allselected())

return

IF (_is ,(%)PRODUCT,(%)SUB-PRODUCT)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.