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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PowerRobots99
Helper II
Helper II

Is there any way to fix the drill through ?

 Hello Friends,

Please refer link with DemoChallange.pbix file. 

https://drive.google.com/file/d/1AiwTOfo0gtSxiIF9F5Cgroh71MmAgM6U/view?usp=sharing

 

I have displayed numbers in matrix visual as shown.

 

PowerRobots99_1-1723695292686.png

 

Now, lets understand logic for the calculation - (Lets take exmaple for Location- A and Report date - 8/11/2024)

 

We need to find out how many transactions were scheduled between (5 Aug-11 Aug) from previous report week's data to report numbers for - 8/11/2024,

To do this, we need to select report date - 8/4/2024, and from "TransScheduleCompletionDate" we need to find out how many transactions are scheduled from (5 Aug-11 Aug), so, if for example 57 transactions were scheduled, we need to report this number under 8/11/2024.

 

I have this measure which work perfect, 

 

ScheduledTrans =
 var selDate = LASTDATE(Data[ReportDate]) --Capture current Report Date
 var lastweek = DATEADD(selDate,-7,DAY)
 var filDate =
 CALCULATETABLE( --modify filters
    FILTER(Data, [TransScheduleCompletionDate] > lastweek &&[TransScheduleCompletionDate] <= selDate)
    --only return rows after last week (excl 04) and to this week (inc 11/08)
    ,Data[ReportDate] = lastweek--replace current report filter with last week
    )
 RETURN
 COUNTROWS(filDate)
 
However, drill through on on "ScheduledTrans" numbers doesnt fetch any data as there is conflict between filter contexts.
Is there any way to fix this?  
6 REPLIES 6
PowerRobots99
Helper II
Helper II

@SamWiseOwl Sir, may i know if there any way to tackle this..

rajendraongole1
Super User
Super User

Hi @PowerRobots99 -you can modify the measure so that it works with both the visual filter context and the drill-through feature. 

 

ScheduledTrans =
VAR selDate = LASTDATE(Data[ReportDate]) -- Current report date
VAR lastweek = DATEADD(selDate, -7, DAY) -- Previous report date
VAR filDate =
CALCULATETABLE(
FILTER(
Data,
Data[TransScheduleCompletionDate] > lastweek
&& Data[TransScheduleCompletionDate] <= selDate
),
REMOVEFILTERS(Data[ReportDate]) -- Remove filters on ReportDate to avoid conflict
)
RETURN
COUNTROWS(filDate)

 

Hope the above measure helps. still issue exist please share pbix file.





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

Proud to be a Super User!





Appreciate your response on this,

But i have already shared a link with .pbix file,

 

https://drive.google.com/file/d/1AiwTOfo0gtSxiIF9F5Cgroh71MmAgM6U/view?usp=sharing

 

Please refer the same for more details, 

thank you.

Hi @PowerRobots99 - Thanks for sharing will check this.





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

Proud to be a Super User!





Thank you for your response,

 

ScheduledTrans =
VAR selDate = LASTDATE(Data[ReportDate]) -- Current report date
VAR lastweek = DATEADD(selDate, -7, DAY) -- Previous report date
VAR filDate =
CALCULATETABLE(
FILTER(
Data,
Data[TransScheduleCompletionDate] > lastweek
&& Data[TransScheduleCompletionDate] <= selDate
),
REMOVEFILTERS(Data[ReportDate])     -- Remove filters on ReportDate to avoid conflict
)
RETURN
COUNTROWS(filDate)

 

If we remove filter like this, it won’t give us correct count as per requirements,

As we need to find out how many transactions were scheduled between (5 Aug-11 Aug) from previous report date's i.e (8/04/2024) data to report numbers under - 8/11/2024, we have to keep that filter.

 

ScheduledTrans =
VAR selDate =
    LASTDATE ( Data[ReportDate] ) --Capture current Report Date
VAR lastweek =
    DATEADD ( selDate, -7, DAY )
VAR filDate =
    CALCULATETABLE (
        --modify filters
        FILTER (
            Data,
            [TransScheduleCompletionDate] > lastweek
                && [TransScheduleCompletionDate] <= selDate
        ) --only return rows after last week (excl 04) and to this week (inc 11/08)
        ,
        Data[ReportDate] = lastweek     --replace current report filter with last week
    )
RETURN
    COUNTROWS ( filDate )

Thanks for the info. 

I thought to preserve the ReportDate filter by modifying the calculation to filter based on the previous report date while maintaining the correct context for the current week. The key idea is to control the filter flow properly during drill-through without conflicting with the slicer.

Can you check below measure:

ScheduledTrans =
VAR selDate = LASTDATE(Data[ReportDate]) -- Capture current Report Date
VAR lastweek = DATEADD(selDate, -7, DAY) -- Previous Report Date
VAR transactionsScheduled =
CALCULATETABLE (
FILTER (
Data,
Data[TransScheduleCompletionDate] > lastweek
&& Data[TransScheduleCompletionDate] <= selDate
),
Data[ReportDate] = lastweek -- Ensure we filter on the previous report date
)
RETURN
COUNTROWS(transactionsScheduled)

 

Hope it helps.





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

Proud to be a Super User!





Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.