cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
LBE Frequent Visitor
Frequent Visitor

Drillthrough on measure with dax filter context not working

Hi,

 

In my report I use some measures with filter context in the dax code, for example:

 

Count Orchid Cut = CALCULATE(COUNT(VarietyTable[VarietyId]);VarietyTable[Crop] = "Orchid Cut")
 
On my main page I have a gauge based on this measure. Now I want to do a drillthrough on this gauge, so I have made a second page with details from my VarietyTable and the Count Orchid Cut measure as the drillthrough field.
But when I hit drillthrough on the gauge the result is the complete set, not filtered for the specified crop.
 
Is this a flaw in Power BI or am I doing something wrong?
 
Thanks in advance!
Leon
1 ACCEPTED SOLUTION

Accepted Solutions
OwenAuger Super Contributor
Super Contributor

Re: Drillthrough on measure with dax filter context not working

Hi Leon,

 

When using drillthrough, filters created within a measure with CALCULATE are not passed to the drillthrough page.

Only filters from the report itself can be passed, i.e. fields in the visual itself, slicers, other filters.

 

I agree that this makes it confusing when drilling through from a measure like Count Orchid Cut.

 

This post discusses the same issue and proposes a solution by using a measure on the drillthrough page that replicates the filter on the original visual.

 

In your case, it sounds like you have a table or similar visual on the drillthrough page. You could add a visual level filter to that visual with a slightly modified measure set to is not blank:

Count Orchid Cut =
CALCULATE (
    COUNT ( VarietyTable[VarietyId] );
    KEEPFILTERS ( VarietyTable[Crop] = "Orchid Cut" )
)

By the way, do you have multiple measures of a similar nature that all need to drillthrough?

 

Regards,

Owen



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




2 REPLIES 2
OwenAuger Super Contributor
Super Contributor

Re: Drillthrough on measure with dax filter context not working

Hi Leon,

 

When using drillthrough, filters created within a measure with CALCULATE are not passed to the drillthrough page.

Only filters from the report itself can be passed, i.e. fields in the visual itself, slicers, other filters.

 

I agree that this makes it confusing when drilling through from a measure like Count Orchid Cut.

 

This post discusses the same issue and proposes a solution by using a measure on the drillthrough page that replicates the filter on the original visual.

 

In your case, it sounds like you have a table or similar visual on the drillthrough page. You could add a visual level filter to that visual with a slightly modified measure set to is not blank:

Count Orchid Cut =
CALCULATE (
    COUNT ( VarietyTable[VarietyId] );
    KEEPFILTERS ( VarietyTable[Crop] = "Orchid Cut" )
)

By the way, do you have multiple measures of a similar nature that all need to drillthrough?

 

Regards,

Owen



Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




LBE Frequent Visitor
Frequent Visitor

Re: Drillthrough on measure with dax filter context not working

Hi Owen, thanks for your answer. Indeed I have multiple measures that all need to drillthrough.

Regards, Leon

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 127 members 1,510 guests
Please welcome our newest community members: