cancel
Showing results for
Did you mean:
Highlighted
Visitor

Data Grouping

I've got an Excel spreadsheet with Dates and values associated with each dates,

I'm trying to make a graph that can compare the sum of the values from June 21st 2018 to June 21st 2019 to the sum of the values between June 21st 2019 to June 21st 2020.

Is it possible ?

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
Microsoft

Re: Data Grouping

Hi @Iab3 ,

I'm not sure what your table structure looks like and what kind of output visual you want.

I'd like to suggest you to create some Meaures as below.

``````sum2019 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2018,6,21)&&'Table'[date]<DATE(2019,6,21)))
sum2020 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2019,6,21)&&'Table'[date]<DATE(2020,6,21)))``````

Result would be shown as below.

If i misunderstood your meaning, please share some sample data and expected result to us if you don't have any Confidential Information.

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 REPLIES 2
Super User IV

Re: Data Grouping

Hi there

This would be possible, what you would need to do is to create a measure using the SAMEPERIODLASTYEAR

Or you would need to define a period in your date table for the values you want to compare?

If you have some sample data, that would assist people in giving you the solution.

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Power BI Blog
Microsoft

Re: Data Grouping

Hi @Iab3 ,

I'm not sure what your table structure looks like and what kind of output visual you want.

I'd like to suggest you to create some Meaures as below.

``````sum2019 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2018,6,21)&&'Table'[date]<DATE(2019,6,21)))
sum2020 = CALCULATE(SUM('Table'[value]),FILTER('Table','Table'[date]>=DATE(2019,6,21)&&'Table'[date]<DATE(2020,6,21)))``````

Result would be shown as below.

If i misunderstood your meaning, please share some sample data and expected result to us if you don't have any Confidential Information.

Best Regards,

Jay

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors