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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
PatilPrasad027
Resolver I
Resolver I

Year wise calculation

Hi Community..!!

PatilPrasad027_0-1726035548825.png

Please refer the above image,

Product-Backend is coming from Product table

Year is coming from Date table 

I want to display in column Market Growth YOY - value of 2022 will sum i.e 13474 + 3381 = 16855 and value of 2023 will sum i.e 12698 + 8659 = 21357 
and result will diplay like this 
2022      16855

2022      16855

2023      21357

2023      21357

 

Could you please help me to resolve this.

1 ACCEPTED SOLUTION
v-yaningy-msft
Community Support
Community Support

Hi, @PatilPrasad027 

Thanks for TomMartens and dharmendars007 reply. If you have not solve the problem. You can try using the following measure.

vyaningymsft_0-1726626833813.png

My Model:

vyaningymsft_1-1726626932335.png

Market Growth YOY = 
CALCULATE (
    SUMX ( 'Product', 'Product'[Value] ),
    ALLEXCEPT ( 'Product', 'Date'[Year] )
)

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

View solution in original post

7 REPLIES 7
v-yaningy-msft
Community Support
Community Support

Hi, @PatilPrasad027 

Thanks for TomMartens and dharmendars007 reply. If you have not solve the problem. You can try using the following measure.

vyaningymsft_0-1726626833813.png

My Model:

vyaningymsft_1-1726626932335.png

Market Growth YOY = 
CALCULATE (
    SUMX ( 'Product', 'Product'[Value] ),
    ALLEXCEPT ( 'Product', 'Date'[Year] )
)

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

dharmendars007
Memorable Member
Memorable Member

Hello @PatilPrasad027 , 

 

You can use the below formula pattern to achieve the result you are looking for..

 

dharmendars007_0-1726040814857.png

 

If you find this helpful , please mark it as solution and Your Kudos are much appreciated!

 

Thank You

Dharmendar S

LinkedIN 

 

Hi @dharmendars007 
Its showing below result if i use your dax code 

PatilPrasad027_0-1726043591233.png

But my requirement is different - you can refer my question.

 

Thanks..!!

Hey @dharmendars007 ,

 

I'm wondering about the difference between your solution and mine because:

  • your solution does not state if it's a measure or a calculated column
  • your solution does not reflect on the different tables, like the Date and Product table

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany
TomMartens
Super User
Super User

Hey @PatilPrasad027 ,

 

you have to create a measure, this will do the trick:

Market Growth YOY = 
CALCULATE(
SUM('<the table namw>'[Value]),
ALL('Product'[Product-Backend])
)

Hopefully, this creates what you are looking for.

If not, create a pbix file that contains sample data, but still reflects your semantic model (tables, relationships, calculated columns, and measures), upload the pbix to OneDrive, Google Drive, or dropbox and share the link. If you are using a spreadsheet to create the sample data, instead of the manual input method, share the spreadsheet as well.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi @TomMartens 

PatilPrasad027_1-1726043728520.png

Its showing below result if i use your dax code.

Hey @PatilPrasad027 ,

 

you can try this:

 

Market Growth YOY = 
CALCULATE(
SUM('<the table namw>'[Value]),
ALL('Product'[Product-Backend]),
'Product'[Product-Backend] in { "Aimovig / ..." , "Ajovy / ..." }
)

 

Make sure that you provide the 2 items from the Product-Backend column shown in your image.

 

Regards,

Tom

 



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.