cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
msommerf
Helper III
Helper III

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.

1 ACCEPTED SOLUTION
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)

View solution in original post

1 REPLY 1
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)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors