cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
reinib
New Member

what dax function to highlight parts of a line graph dynamically

I have a power report where I am trying to measure how marketing campaigns has have an impact on the sale of 10 financial instruments (ETF, Fund, etc). 

 

The source of the data is an Excel data sheet which includes the sale for a  product row by row, for each month. There is also a column called MarketingPushed which contains either a 1 or a 0 in the row based on whether or not the product was pushed in marketing that month. 

 

In this dashboard,  I have a graph with different filters and slicers where the main attraction is a graph where is represented a sum of sales for each product for each month from 2021 till now.

 

In order to better visualize the marketing impact on sales, I want this graph to include a shaded region from the date at which a campaign would have started till the end of the campaign. 

 

 

I have included different slicers for the product and this shaded region to only appear when a specific product is selected in the legend. 

 

How do you believe I should proceed? Using a DAX formula? Conditional formatting? 

 

 

thank you for your help,

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @reinib ,

 

To visualize the impact of marketing campaigns on sales in Power BI Desktop, you can use a combination of features such as conditional formatting and data bars.

You can use conditional formatting to highlight the cells that contain the sales data for the products that were pushed in marketing that month. You can also use data bars to create a visual representation of the sales data.

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

You can add a measure as the field based on to format the style.

 

Best Regards,
Stephen Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @reinib ,

 

To visualize the impact of marketing campaigns on sales in Power BI Desktop, you can use a combination of features such as conditional formatting and data bars.

You can use conditional formatting to highlight the cells that contain the sales data for the products that were pushed in marketing that month. You can also use data bars to create a visual representation of the sales data.

Apply conditional table formatting in Power BI - Power BI | Microsoft Learn

You can add a measure as the field based on to format the style.

 

Best Regards,
Stephen Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors