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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
yigitarican
Frequent Visitor

Filter Only One Measure In Visual By Using Slicer

Hello, I am a beginner in Power BI and I couldn't solve this problem on my own. 

 

I have a table with the following columns:

Task NameStatusPriorityTask Completion DatePriority Interval(Custom Column)
Task Name 1Completed 1.45.06.20230-1.5 Priority
Task Name 2Waiting2.3null1.5-3.5 Priority
Task Name 3Postponed3null1.5-3.5 Priority
Task Name 5null5null3.5-5 Priority
...............................................................................

 

By using this data source, I have created a stacked bar chart. On the X-Axis, it shows priority intervals while on the Y-Axis it shows amount of tasks grouped according to their statuses. I created 4 measures for each of statuses in table by filtering status measure. So far chart looks like this:

 

yigitarican_0-1698995480773.png

 

The problem I encounter is when I apply a slicer which uses "Task Completion Date" as value, it only filters tasks with "Completed" status, because other statuses don't have completion date. To prevent that, only measure "Tasks with Completed status" must be affected from slicer.  Other 3 measures remain same. That means only one bar in the picture above should change when user interact with slicer while other 3 bars still same.

 

Thank you for your help.

1 ACCEPTED SOLUTION

Hi   

Okay, so your measure for Completed should remain the same, but for the other statuses you can use something like this:

Postponed =
CALCULATE(
    COUNTA('TableName'[TaskName]),
    'TableName'[Status] IN { "Postponed" },
    REMOVEFILTERS( 'TableName'[Task Completion Date] )
)

 

@yigitarican


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

View solution in original post

5 REPLIES 5
yigitarican
Frequent Visitor

Hello @Adescrit , you can see DAX I have used below:

 

Amount of Task Name for Completed =
CALCULATE(
    COUNTA('TableName'[TaskName]),
    'TableName'[Status] IN { "Completed" }
)
 
It is autogenerated by Power BI when I add new quick measure which filters status="Completed" to the Y-Axis value "# Of Task Name" in the visual. 
 
Thank you for your reply.

Hi   

Okay, so your measure for Completed should remain the same, but for the other statuses you can use something like this:

Postponed =
CALCULATE(
    COUNTA('TableName'[TaskName]),
    'TableName'[Status] IN { "Postponed" },
    REMOVEFILTERS( 'TableName'[Task Completion Date] )
)

 

@yigitarican


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

@Adescrit It worked ,thank you so much. I guess I need to work on how to write DAX and DAX commands more 😄

 

Have a good day sir.

100%. DAX is the key to Power BI.


Did I answer your question? Mark my post as a solution!
My LinkedIn
Adescrit
Impactful Individual
Impactful Individual

Hi @yigitarican are you able to provide the DAX you have used in one of your existing measures? I have an idea how to solve this but it would help if I can see what calculation you're currently doing.


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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.