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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PradeepDive
Helper II
Helper II

HASONFILTER doesn't work with Slicer

Hi All,

 

I am creating a drillthrough button in my report and for which I am using HASONEFILTER to see if a filter is applied or not.

I also have a slicer (dropdown) in my page. Basically what the formula does is checks if user selects a value from the slicer and if selected it give me a page name. The page name is used as a navigation to drillthrough page. Below is my DAX

 


MyDrillthrough Navigation =

        Var _isValueSelected = HASONEFILTER('Project List'[ORG])

Return

        IF(_isValueSelected ,"Details Page","")

 

 I one slicer dropdown for 'Project List'[ORG]) and another visual of a small metrix table as 'Project List'[ORG]) and Cost

 

🤔So now the strange part, when I select ORG from dropdown the drillthrough button doesn't work. BUT if I select ORG from the metrix visual then the drillthrough button works...

 

I am sure dropdown is the issue ? Does HASONEFILTER doesn't work with slicers ?

 

Please help. 

3 REPLIES 3
amitchandak
Super User
Super User

@PradeepDive , Try isfiltered

 

IF(isfiltered('Project List'[ORG]) ,"Details Page","")

 

refer this for difference https://powerpivotpro.com/2013/03/hasonevalue-vs-isfiltered-vs-hasonefilter/

Thanks Amit,

 

I have tried  ISFILTERED as well as HASONEFILTER but both are not working with drill through button if I select is through slicer (dropdown OR list). 

 

Wried thing is if I add it as a simple table or matrix table and select it works...

Hi @PradeepDive ,

 

If you want to drill through to the detail page when you select in a slicer, Power BI cannot support to jump to detail page.

Drill Through will appear when you right-click the filed on Visual.

 

You can refer to the following documents.

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-drill-through-buttons

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-drillthrough

 

HASONEFILTER1.jpg

 

The function of the MyDrillthrough Navigation measure is that when ORG is selected, the corresponding row will display the Details Page, and the remaining rows will be empty, and there is no jump function.

 

HASONEFILTER2.jpg

 

HASONEFILTER3.jpg

 

If it doesn’t meet your requirement, could you please provide a mockup sample based on fake data?

It will be helpful if you can show us the exact expected result based on the tables.

 

Please upload your files to OneDrive For Business and share the link here. Please don't contain any Confidential Information or Real data in your reply.

 

Best regards,

 

Community Support Team _ zhenbw

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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