Forum Discussion
Combo line & clustered chart does not work
My dataset looks like the following and I am trying to build a chart like the first picture below. I tried using the line & clustered column chart (2nd picture), but the issue is that the columns for the same month this year & last year are not together, and the prices of SKU 1 and SKU 2 are not on top of each other. It there a different chart I can use, or can I manipulate the data in a way that makes it possible? I tried duplicating the table, but I can't seem to make some columns/lines refer to one SKU and the others refer to another SKU. Thanks a lot!
| SKU | Year | Month | Volume | Price | Date |
| SKU 1 | 2020 | 1 | 200 | 45 | 1/1/2020 |
| SKU 1 | 2020 | 2 | 210 | 46 | 2/1/2020 |
| SKU 1 | 2020 | 3 | 189 | 45 | 3/1/2020 |
| SKU 1 | 2020 | 4 | 120 | 45 | 4/1/2020 |
| SKU 2 | 2020 | 1 | 300 | 45 | 1/1/2020 |
| SKU 2 | 2020 | 2 | 250 | 46 | 2/1/2020 |
| SKU 2 | 2020 | 3 | 204 | 43 | 3/1/2020 |
| SKU 2 | 2020 | 4 | 350 | 45 | 4/1/2020 |
| SKU 1 | 2019 | 1 | 120 | 44 | 1/1/2019 |
| SKU 1 | 2019 | 2 | 126 | 44 | 2/1/2019 |
| SKU 1 | 2019 | 3 | 200 | 43 | 3/1/2019 |
| SKU 1 | 2019 | 4 | 72 | 43 | 4/1/2019 |
| SKU 2 | 2019 | 1 | 360 | 44 | 1/1/2019 |
| SKU 2 | 2019 | 2 | 300 | 42 | 2/1/2019 |
| SKU 2 | 2019 | 3 | 200 | 43 | 3/1/2019 |
| SKU 2 | 2019 | 4 | 420 | 44 | 4/1/2019 |
2 Replies
- v-frfei-msft
Community Support
Hi Anonymous ,
In you scenario, we should create measures to work on it.
sk1 = CALCULATE(SUM('Table'[Volume]),FILTER('Table','Table'[Year]=2020 && 'Table'[SKU] = "SKU 1"))SK1 LY = CALCULATE(SUM('Table'[Volume]),FILTER('Table','Table'[Year]=2019 && 'Table'[SKU] = "SKU 1"))Sk2 = CALCULATE(SUM('Table'[Volume]),FILTER('Table','Table'[Year] = 2020 && 'Table'[SKU] = "SKU 2"))Sk2 ly = CALCULATE(SUM('Table'[Volume]),FILTER('Table','Table'[Year] = 2019 && 'Table'[SKU] = "SKU 2"))Pbix as attached.
- AnonymousNot applicable
Thanks for your response. The issue is that I'd like to use slicers for the two SKUs, so they shouldn't be hard-coded into the measures.