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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
sanman
Helper I
Helper I

Setting a default filter with zero output and using Query string parameter filters in URL

We can filter the data in report by adding url paramter ?filter=Table/Column eq 'value'

I want to use this scenario to show customer related data for customers who are logged into my web app.

 

I know there might be some savvy user who takes out the filter parameters and see all other customer related data. 

Is it possible to have the default set to some fake customerID then only show correct report if a correct customerID is included in the URL filter?

1 ACCEPTED SOLUTION

@sanman ,

//making measure blank

if(isfiltered(Table[Customer]), [Measure], blank())

//use this measure at visual level filter , =1, will make visual blank if not filered

if(isfiltered(Table[Customer]), 1, 0)

 

Also refer

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @sanman ,

 

Your demand is a good idea, while it is unsupported to set Row Level Security for different customer roles in URL parameter in Power BI currently. You may post your new idea in Idea Forum , add your comments there to improve Power BI and make this feature coming sooner.

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

Greg_Deckler
Super User
Super User

@sanman You could use ISFILTERED and if it is not filtered return BLANK()?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

I am new at this so would appreciate if you could explain further where to use the isfiltered and where to return blank() ?

@sanman ,

//making measure blank

if(isfiltered(Table[Customer]), [Measure], blank())

//use this measure at visual level filter , =1, will make visual blank if not filered

if(isfiltered(Table[Customer]), 1, 0)

 

Also refer

https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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