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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Pley92
Regular Visitor

How to apply a calculated slicer only on one line in a line chart?

Hi, 

 

I have the following business case: a company has begun an email marketing campaign to entice its customers to put more orders in. In order to verify if the email campaign is having an impact, customers have been divided into controls and targets: controls will not receive any emails, whereas targets will. 

 

The variable that we want to monitor over time is the average number of orders that customers have made , split (Legend) by whether they are controls or targets. For this, I have chosen a line chart.

 

Next, we want to be able to filter (Slicer) by the weekly average number of emails received by each customer: the rationale behind it is that, if the marketing campaign works and we report only those targets who have received a high average number of emails per week, the distance between the control line and the target line should increase.

 

To do that, I have created a calculated column with the following logic (please refer to the PBIX that I've linked for the DAX formula): sum of all emails received by each customer / (latest update - customer join date) * 7.

 

The problem is that, if I use this calculated column as a slicer, as soon as the lowest limit is raised from 0, the control line disappears; this is because controls, by definition, controls do not receive emails. To illustrate even better:

 

Before

Pley92_0-1683897457721.png

After

 

Pley92_1-1683897547076.png

 

 

So my question is the following: how do I create a slicer so that it only filters the target line, but not the control? The control line should remain always the same, whereas the target line should filter based on the range specified in the slicer.

Please notice that I have also included a slicer on JoinDate: this slicer should keep on working on both the control and the target lines.

 

As I've mentioned, I am linking the PBIX file (click on the link and then the Download arrow). 

 

Many thanks!

0 REPLIES 0

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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