cancel
Showing results for
Did you mean:
sjensen Regular Visitor

## Using data from the same column

I am trying to calcuate something within the same column. I want to take the data from different years and calculate the percentage difference.

Maybe I am close?

Calculate(sum(Data Table [column] = 2015 - Calculate(sum(Date Table [column] = 2014

Do this from 2014 until current. Then calculate the percentage difference from there by: Calculate(sum(Data Table [column] = 2015 - Calculate(sum(Date Table [column] = 2014) /(Sum(Data Table [column] = 2015) *(100)

This does not work but I am thinking I may be close?

2 REPLIES 2 Super User I

## Re: Using data from the same column

Hello @sjensen,

Try something like: *this should get you closer even though it is calculating Year to Date*

`Total = SUM(Table1[Value])`
```YTD Value =
TOTALYTD(
[Total],Table1[Date]
) ```
```[ LY Value YTD] =
CALCULATE(
TOTALYTD([Total],Table1[Date]),
SAMEPERIODLASTYEAR(Table1[Date])
) ```
```% Difference =
DIVIDE([YTD Value]-[ LY Value YTD],[ LY Value YTD])``` Proud to be a Super User!

Highlighted
sjensen Regular Visitor

## Re: Using data from the same column

Thank you for that information! I created the equations and added the Percent equation with a date field of year to divide it up by year but it is just saying Cant display the visual. Even just having the Percent equation is also saying the same thing. I am sure I needt adjust something but I am stuck at this point.

Announcements #### Coming Soon: T-Shirt Design Contest

Keep your eyes open for our upcoming T-shirt design contest! #### 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 Platform Online Conference 