Forum Discussion

msommerf's avatar
msommerf
Icon for Helper III rankHelper III
7 years ago
Solved

Bar & Line Chart for fixed Year

Hi,

 

I am looking to create a Bar & Line chart displaying Sales This Year against Sales Last Year as bars with a line displaying sales for a fixed year of 2016.

 

I can easily get sales this year and last year but how do i create a measure that will always display 2016 data for my line?

 

Any help appreciated.

  • Anonymous's avatar
    Anonymous
    7 years ago
    Sales_2016 = CALCULATE(sales,FILTER(Table;Table[date].[Year]=2016))
    Assuming your date has a hierarchy, did you try something like that ?
    Create a new measure similar to the old one and add a filter to it (replace sales with your formula)

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable
    Sales_2016 = CALCULATE(sales,FILTER(Table;Table[date].[Year]=2016))
    Assuming your date has a hierarchy, did you try something like that ?
    Create a new measure similar to the old one and add a filter to it (replace sales with your formula)