Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
vanetti
Frequent Visitor

Calculate % increase in measures of a grafic

I´ve created a grafic that increases in time.

I have several different filter in that page, been the most important one the date.

 

I would like to show in the report a card with the % increase or decrease respecting all filter from the page.

 

What is the best was to do it?

 

Caxxpturar.PNG 

 

1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @vanetti,

 

Below is the result in my test, you can take it as a reference.

 

Sample data.

1.PNG

 

Create below measures.

Min for year = CALCULATE(SUM(increase[Sales]),FILTER(increase,increase[Date].[Year]=CALCULATE(MIN(increase[Date].[Year]),ALLSELECTED(increase))))

Max for year = CALCULATE(SUM(increase[Sales]),FILTER(increase,increase[Date].[Year]=CALCULATE(Max(increase[Date].[Year]),ALLSELECTED(increase))))

increase percentage = DIVIDE([Max for year]-[Min for year],[Min for year])

 

Add measure [increase percentage] into a card.

2.PNG

 

If you still have any question, please feel free to ask.

 

Best regards,
Yuliana Gu

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

View solution in original post

2 REPLIES 2
v-yulgu-msft
Employee
Employee

Hi @vanetti,

 

Below is the result in my test, you can take it as a reference.

 

Sample data.

1.PNG

 

Create below measures.

Min for year = CALCULATE(SUM(increase[Sales]),FILTER(increase,increase[Date].[Year]=CALCULATE(MIN(increase[Date].[Year]),ALLSELECTED(increase))))

Max for year = CALCULATE(SUM(increase[Sales]),FILTER(increase,increase[Date].[Year]=CALCULATE(Max(increase[Date].[Year]),ALLSELECTED(increase))))

increase percentage = DIVIDE([Max for year]-[Min for year],[Min for year])

 

Add measure [increase percentage] into a card.

2.PNG

 

If you still have any question, please feel free to ask.

 

Best regards,
Yuliana Gu

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

Thank you @v-yulgu-msft!!!

Great answer!

Just had to change the SUM for AVERAGE to get the result I wanted!

 

Min for year = CALCULATE(SUM(increase[Sales]),FILTER(increase,increase[Date].[Year]=CALCULATE(MIN(increase[Date].[Year]),ALLSELECTED(increase))))

 

Max for year = CALCULATE(SUM(increase[Sales]),FILTER(increase,increase[Date].[Year]=CALCULATE(Max(increase[Date].[Year]),ALLSELECTED(increase))))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.