cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

How to create a column chart, comparing two different dates from a single date column ?

Hi friends,

I am hoping someone could suggest me a way to create a clustered column chart comparing values for two different date ranges from a  single date column.

I have a table with a date cloumn, with data from October 2015 to October 2017. I would like to draw a clustered column chart comparing monthly data for two date ranges. i.e. 1)from 27-oct-15 to 26 Aug 2016 and 2) from 27-oct-16 to 26- Aug- 2017. 

Here is the visual with the monthly data for the date range 27-oct-16 to 26-Aug-17:

2.png

 

Below is the Axis parameters used for the above graph:

3.png

 


I would like to add/compare the monthly data for date range (27-oct-15 to 26 Aug 2016) to the above column chart. Any help would be very much appreciated. 
Thank you!!!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Microsoft
Microsoft

Re: How to create a column chart, comparing two different dates from a single date column ?

Hi @Rck7,

Please create a measure using the similar formula below.

2015/10/27-2016/8/26 = CALCULATE(sum(Table[Tokens],SAMEPERIODLASTYEAR(Table[date]))

Then add the measure above in as value level in the clustered column chart, and check if it works fine. If this still doesn't resolved your issue, please share yoru sample table for further analysis.

Best Regards,
Angelia

View solution in original post

2 REPLIES 2
Highlighted
Microsoft
Microsoft

Re: How to create a column chart, comparing two different dates from a single date column ?

Hi @Rck7,

Please create a measure using the similar formula below.

2015/10/27-2016/8/26 = CALCULATE(sum(Table[Tokens],SAMEPERIODLASTYEAR(Table[date]))

Then add the measure above in as value level in the clustered column chart, and check if it works fine. If this still doesn't resolved your issue, please share yoru sample table for further analysis.

Best Regards,
Angelia

View solution in original post

Highlighted
Helper II
Helper II

Re: How to create a column chart, comparing two different dates from a single date column ?

@v-huizhn-msft@CheenuSing Thanks for your help!! I am able to view current year totatls with the past year(Fiscal Year2) totals by using the measure you suggested. 

Additionally, 1)Is there also a measure where I could see the past two year totals(Fiscal year1&2) with the current year? 
2) How could I reformat the dates on my chart to start from (Oct16- August17) ?

Here is my chart: 

3.png4.png

Any help would be appreciated. 
Thanks. 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Featured Data Story of The Month

Featured Data Story of The Month

All Data Stories Gallery contributions are reviewed for each month. We select a contribution and feature the community member the following month.

Power BI Dev Camp - Developing with .NET Core

Power BI Dev Camp - Developing with .NET Core

Learn how to develop custom web applications for Power BI using .NET Core 3.1 and .NET 5.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors