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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
arichmond
Regular Visitor

Send object to the back with dax

I have a page I want to hide for certain users. One work around I have found is to add a square over the data so that it cannot be seen. Here is the code I used to make that square transparent: 

Hide Teacher Data = IF(SELECTEDVALUE('User Master List'[Type]) IN{"Other"}, "#02102D","#FFFFFF00")
 
However, I then lose functionality of the page as it now has a transparent box in front of it when the user is allowed to see it. Is there a dax code I could use to also move that shape to the back of the visuals so that the page becomes interactive and move it to the front if not allowed. Something like: 
Hide Teacher Data = IF(SELECTEDVALUE('User Master List'[Type]) IN{"Other"}, "#02102D","#FFFFFF00") IF(SELECTEDVALUE('User Master List'[Type]) IN{"Other"}, "zorder back,"zorder front")
1 ACCEPTED SOLUTION
arichmond
Regular Visitor

I solved this issue by  using this tutorial Using Conditional Formatting to Display a Message Instead of a Blank Visual |  @parry2k 

I was able to do a measure 

 
Color Text = "#FFFFFF" &IF(SELECTEDVALUE('User Master List'[Type]), "00" )
Then connect that to my visuals via the font color formula on the data labels. If the wrong user is connected, the visuals will say error. 

View solution in original post

6 REPLIES 6
parry2k
Super User
Super User

@arichmond glad to hear it was helpful. I think I have a couple of videos on this on my channel:

 

Color transparency and conditional formatting is VERY powerful Part 1 - Power BI (youtube.com)

Conditional Formatting and Transparency to develop user friendly reports Part II - Power BI (youtube...

 

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

arichmond
Regular Visitor

I solved this issue by  using this tutorial Using Conditional Formatting to Display a Message Instead of a Blank Visual |  @parry2k 

I was able to do a measure 

 
Color Text = "#FFFFFF" &IF(SELECTEDVALUE('User Master List'[Type]), "00" )
Then connect that to my visuals via the font color formula on the data labels. If the wrong user is connected, the visuals will say error. 

Again, this is just cosmetics. The user can still see the data when they connect to the semantic model.

arichmond
Regular Visitor

Would it be possible to hide the page and link a button to it and program the button to go to that page if they are the correct user?

Page level security does not exist. Don't waste your time.

 

Use separate reports if needed. (Only if truly needed)

lbendlin
Super User
Super User

Page level security does not exist. Don't waste your time.

 

It is not possible to change the Z order programmatically. If this is important to you please consider voting for an existing idea or raising a new one at https://ideas.fabric.microsoft.com

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.