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
Anonymous
Not applicable

Compare Data in the Same Column - Stock Market Data

Hi folks,

 

I am looking at stock performance per stock at a monthly level and wanting to compare between 2. An example of the data structure is as follows:

stock data.PNG

I have a slicer that that allows you to select 2 stocks. Based on those 2 stocks, I would like to show on a chart (bar, area, etc) the difference between the performance of those 2 stocks. For example, in January 2020, the difference between stock A and stock B is 4%. If I then chose stock A and stock C, the chart should show -3%. The dataset will have many more stocks than just 3, which is why I had initially set up the data this way. I had looked at the variance visualizations, but they are really set up to have 2 different columns or scenarios. Perhaps with DAX there is a way to build a view of the 2 stocks that are selected with the slicer to have them set up in 2 columns (stock 1 and stock 2)?

 

I am really not sure the best way to solve my problem, any help is very much appreciated, thanks.

1 ACCEPTED SOLUTION
Jamesmathew
Helper I
Helper I

2 REPLIES 2
Jamesmathew
Helper I
Helper I

Please look into the below attached solution.

https://1drv.ms/u/s!AlTyyZ_9D_WjimRn2uMpJfoNnKTF 

Anonymous
Not applicable

Thank you for your quick response, that worked incredibly well.

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

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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