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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

April Fabric Community Update

Fabric Community Update - April 2024

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

March 2024 PBI Gallery Image

Power BI Monthly Update - March 2024

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

Top Solution Authors