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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply

ALLEXCEPT measure, but I want the Visual to stay filtered

Hello All, 

My question is probably answered somewhere but I can't find it. 

 

I created a measure like this: 

CountFailureInThePast10Weeks = 
CALCULATE(
    [Count Tasks Executions],
    ALLEXCEPT( TASK_HISTORY_VW, TASK_HISTORY_VW[STATE], TASKS_VW[NAME], TASKS_VW[SCHEMA_NAME] ,Datum[Past10Weeks], TASK_HISTORY_VW[DATABASE_NAME])
)

 

The goal is to have the number of failures in the past 10 weeks for a task. 

But I want to keep this number not filtered in a Visual filtered by date. 

 

So, without the measure in the visual, i get 5 lines, the 5 failure of the last 7 days (this is a filter in the visual). And when I add the measure that ignore the date filter, it add lines. 

 

I need, the measure calculated on 10 weeks history in a visual with only the tasks from last week. 

 

How I can achieve that ?

 

Thanks 😄 

2 REPLIES 2

Unfortunatly it doesn't works.

Initial state, my vis is filtered on Pastweek = true : 

Thomas_Daubert_0-1726743504950.png

After including the measure 

Thomas_Daubert_1-1726743541028.png

 

My goal is to keep image 1 with value from measure on image 2

bhanu_gautam
Super User
Super User

@Thomas_Daubert ,You can achieve this by using the REMOVEFILTERS function to remove the date filter context from the calculation

 

CountFailureInThePast10Weeks =
CALCULATE(
[Count Tasks Executions],
ALLEXCEPT(TASK_HISTORY_VW, TASK_HISTORY_VW[STATE], TASKS_VW[NAME], TASKS_VW[SCHEMA_NAME], TASK_HISTORY_VW[DATABASE_NAME]),
REMOVEFILTERS(Datum[Past10Weeks])
)

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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