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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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

Top Solution Authors