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

Creating a measure Last Year

Hi 

I am wanting to create a measure for Last Year, but instead the number I get is all years (2020,2021 and 2022)

Here is my measure

Total Quoted LY = CALCULATE(SUM('ELT Quotes'[Total Quoted value ()]),DATEADD('Calender Table'[Date],-1,YEAR))
Here is my Date Hierarchy.  What I ultimately am trying to do is show the increase or decrease between last years quoted figures and this years.  e.g. Say, as example This Year 30m, last year 25m, increase of 20%.  I want to show 20% in my visual of 2022 (30m)
JennetK_0-1685597351386.png

 

 

Thanks Jennet

1 ACCEPTED SOLUTION

Hi Thanks for the helpful tip.  I have solved this particular problem.

View solution in original post

5 REPLIES 5
v-yiruan-msft
Community Support
Community Support

Hi @JennetK ,

You can create a measure as below to get it:

Percentage =
DIVIDE (
    SUM ( 'ELT Quotes'[Total Quoted value ()] ) - [Total Quoted LY],
    [Total Quoted LY]
)

In addition, you can refer the following links to get it.

Solved: Re: Percentage difference between current year sal... - Microsoft Fabric Community

vyiruanmsft_0-1685930751058.png

Solved: Re: Calculating Percentage Difference between Curr... - Microsoft Fabric Community

Calculate Difference This Year vs Last Year In Power BI With DAX [2022 Update] - YouTube

 

If the above one can't help you, please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Hi, Thanks.  It didn't work for me.  It doesn't matter for now.  I think the years are best in separate tables.  What you do think?

Hi @JennetK ,

Could you please provide some raw data in your table 'ELT Quotes' (exclude sensitive data) with Text format and your expected result with backend logic and special examples? It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

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

Hi Thanks for the helpful tip.  I have solved this particular problem.

Hi @JennetK ,

It's glad to hear that your problem has been resolved. Could you please mark your post as Answered? It will help the others in the community find the solution easily if they face the same problem as yours. Thank you.

Best Regards

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

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.