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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Only show values if value is selected (Doesn't work with filters)

Hi Team,

 

I'm running into issue where I have an matrix visualization and have card at bottom of that matrix. I only want to display the value in that card when site is selected in matrix. 

 

matrix.PNG

 

If you click on site then dispay the value assocaited with that site in the row card. If no site is selected then say you have to select the site to view the notes.

 

This is measure I created: 

if(HASONEVALUE(Table[Column1]),FIRSTNONBLANK(Table[Column1],1),"Select the site to view the notes")
note.PNG
This measure works if i dont use any filters then it will show select the site to view the notes then i click on site it will give me notes But
 
If I filter by company or other filters driven in matrix, that measure automatically selectes the value rather than showing "Select the site to view the notes"
 
Company and Site is in different table and Notes are in different table. 

 

1 ACCEPTED SOLUTION
TomMartens
Super User
Super User

Hey @Anonymous ,

 

I have to admit, that I do not fully understand your requirement, maybe you want to consider to create a pbix that contains sample data, upload the pbix to onedrive or dropbox and share the link.

 

Nevertheless, it's important to understand that it's not possible to create a DAX statement that evaluates to TRUE, when a certain column value has been clicked, there is no on-click event available. This means, the closest that we can get is the fact that there is just one row. It's a good practice to imagine everything as a table, this DAX statement can be used to check if there is just one ROW ...

COUNTROWS(VALUES('<tablename>'[columnname])

If COUNTROWS(...) results to 1 there is just one, basically HASONEVALUE() or SELECTEDVALUE() can be used to check this as well.

In combination with the DAX functions ISFILTERED (https://dax.guide/isfiltered/) , ISCROSSFILTERED(https://dax.guide/iscrossfiltered/), and ISINSCOPE(https://dax.guide/isinscope/) you can find what you are looking for.

 

Hopefully this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

View solution in original post

2 REPLIES 2
TomMartens
Super User
Super User

Hey @Anonymous ,

 

I have to admit, that I do not fully understand your requirement, maybe you want to consider to create a pbix that contains sample data, upload the pbix to onedrive or dropbox and share the link.

 

Nevertheless, it's important to understand that it's not possible to create a DAX statement that evaluates to TRUE, when a certain column value has been clicked, there is no on-click event available. This means, the closest that we can get is the fact that there is just one row. It's a good practice to imagine everything as a table, this DAX statement can be used to check if there is just one ROW ...

COUNTROWS(VALUES('<tablename>'[columnname])

If COUNTROWS(...) results to 1 there is just one, basically HASONEVALUE() or SELECTEDVALUE() can be used to check this as well.

In combination with the DAX functions ISFILTERED (https://dax.guide/isfiltered/) , ISCROSSFILTERED(https://dax.guide/iscrossfiltered/), and ISINSCOPE(https://dax.guide/isinscope/) you can find what you are looking for.

 

Hopefully this helps to tackle your challenge.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Not sure I got it completely. But if want top and % of it. Use Rank to get top 10 .

 

Refer

https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors