cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Helper I

## Sorting and Calculation

Hi,

I have a data with multiple products, year, month and the values.

I want to plot the line graph showing the % growth of value from Jan to Feb for each year and product as a filter Can you help with code or the measure I need to use for the graph.

1 ACCEPTED SOLUTION
Resident Rockstar

Do you want to get the %change like below?

If you want to get the %change above, you could refer to the measures below.

```Jan = CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Month number]=1&&'Table1'[Year]=MAX('Table1'[Year])))

Feb = CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Month number]=2&&'Table1'[Year]=MAX('Table1'[Year])))

%change = DIVIDE([Feb]-[Jan],[Jan])```

In addition, you could have a reference of Measures – Month to Month Percent Change.

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Resident Rockstar

Do you want to get the %change like below?

If you want to get the %change above, you could refer to the measures below.

```Jan = CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Month number]=1&&'Table1'[Year]=MAX('Table1'[Year])))

Feb = CALCULATE(SUM(Table1[Sales]),FILTER('Table1','Table1'[Month number]=2&&'Table1'[Year]=MAX('Table1'[Year])))

%change = DIVIDE([Feb]-[Jan],[Jan])```

In addition, you could have a reference of Measures – Month to Month Percent Change.

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements