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
Maiymi
Frequent Visitor

How to calculate the difference between two periods on a Donut chart

Hi everyone!

 

I've been trying to do something that I'm not even sure it's possible.

I have this donut chart (image1 below) that displays the Country share by quarter of 2020.

I want to calculate the difference of % between the same quarter but of 2019.

 

Something like this: %quarter2020 - %quarter2019

 

Do you know if its possible to create and include a measure that deliveries what I need on a Donut chart?

or should I use a different visualization? If yes, which one do you recommend?

 

Thank you!!!

Stay safe 😉

 

Image1

Maiymi_0-1618405594156.png

 

 

 

1 ACCEPTED SOLUTION
selimovd
Super User
Super User

Hey @Maiymi ,

 

in general you should keep pie and donuts for dessert 😉

Think before you pie chart (and more effective ways to visualize your data) | by Geckoboard | Geckob...

 

Then sure that's possible. Calculate your measure [Country Share] for that year and then use the SAMPERIODLASTYEAR function as a second measure:

Country Share LY =
CALCULATE(
    [Country Share],
    SAMEPERIODLASTYEAR( myDateTable[Date] )
)

 

Then to get the difference you create a new Measure:

Diff Country Share = [Country Share] - [Country Share LY]

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

2 REPLIES 2
selimovd
Super User
Super User

Hey @Maiymi ,

 

in general you should keep pie and donuts for dessert 😉

Think before you pie chart (and more effective ways to visualize your data) | by Geckoboard | Geckob...

 

Then sure that's possible. Calculate your measure [Country Share] for that year and then use the SAMPERIODLASTYEAR function as a second measure:

Country Share LY =
CALCULATE(
    [Country Share],
    SAMEPERIODLASTYEAR( myDateTable[Date] )
)

 

Then to get the difference you create a new Measure:

Diff Country Share = [Country Share] - [Country Share LY]

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

Hi Selimovd,

 

Thank you very much for your answer and for the article about Pie Charts.

It definetly helped me change my mind regarding those kind of visualization.

 

I will use a bar chart instead!

Thanks 😉

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.