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
Clint
Helper V
Helper V

Filter issue on Measure

Hello,

 

I have the following measure that simply indicates via a "Y" or"N" if a task (Project Online dataset) is done or not.  These tasks (from the Tasks table)  live in a table visual on a page that the user drills thru to based on the Project Name field (from the Projects table).  The Projects table and Tasks table or connected in a One to Many relationship via the ProjectID field.

 

Task Done Y/N =
VAR TaskDone =SUMX('Tasks','Tasks'[TaskPercentWorkCompleted])
Return
CALCULATE(
IF(TaskDone=100,"Y","N"
)

The problem is adding this measre to the table results in the table returning all tasks instead of just the tasks from the project the user drilled thru on.  I know I need account for the project name filter but I don't know how to write this in the DAX.  I tried the below syntax but it doesn't workl

 

Task Done Y/N =
VAR TaskDone =SUMX('Tasks','Tasks'[TaskPercentWorkCompleted])
Return
CALCULATE(
ALLEXCEPT('Projects','Projects'[Project Name]),
IF(TaskDone=100,"Y","N"
))
4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hi @Clint ,

 

Could you please share your sample data and expected result to me if you don't have any Confidential Information? Please upload your files to OneDrive for Business and share the link here.

 

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.

Hi @v-eachen-msft ,

 

We decided to use conditional formatting instead of a Y/N so this measure became a moot issue.

Mariusz
Community Champion
Community Champion

Hi @Clint 

 

Create a Column instead if you want the result to be part of a filter context.

 

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Doesn't Calculate introduce Filter context?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.