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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Page navigation through Dax function

when data is available on the page then the navigation button should be green. when data is not available on the page then the navigation button should be red. I need help and how to apply using DAX functions.

5 REPLIES 5
Anonymous
Not applicable

Hi,

 

suppose I have excel data and connected to power bi and applied if(isempty(table),"Red","Green") function on-page navigation button, now testing the data, if deleted some columns from excel table or deleted entire data except header. Its showing green both the condition, when deleted the columns from table, visual will disappear but button is green. When I again put data in table and showing same (green-button). So, please suggest me.

 

Thanks,

Dharmendra

Hariharan_R
Solution Sage
Solution Sage

Hi

You can get minimally with below expression.

 

Button Color = IF(ISEMPTY('Table'),"Red","Green")
Hariharan_R_0-1655378777876.png

 

Thanks

Hari

Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


My Blog :: YouTube Channel :: My Linkedin


 
Anonymous
Not applicable

I tried on my power bi desktop, but it's not working, please help me with another function that can be applied.

if the above function is working then how?

 

Hi,

You need to display the button based on data availability. I am not sure what kind of slicers and filters are there so considered a table. if the table is empty then visuals using the table is empty. 

 

In the above script, you need to replace 'Table' with your table name. Share us the detailed information to provide correct expression.

 

Thanks

Hari

Anonymous
Not applicable

Hi,

 

suppose I have excel data and connected to power bi and applied if(isempty(table),"Red","Green") function on-page navigation button, now testing the data, if deleted some columns from excel table or deleted entire data except header. Its showing green both the condition, when deleted the columns from table, visual will disappear but button is green. When I again put data in table and showing same (green-button). So, please suggest me.

 

Thanks,

Dharmendra

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.