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
Anonymous
Not applicable

YoY % Expression

Hi Power BI Community!

 

I am a beginner starting Power bi tool recently as a Purchaser.

I would like to express YoY of Purchase volume(PVO) over time in dashboard. 

Would you be able to identify what needs to be corrected on my DAX calculation?

It would be perfect to get a new column YoY % on "FY19~FY22 Added" table.

 

Following is my measure:

PY PVO =
CALCULATE([Total PVO],DATEADD('FY19~FY22 Added'[YEAR],-1, YEAR))
 
Total PVO =
CALCULATE(SUM('FY19~FY22 Added'[PVO]),all('FY19~FY22 Added'[PVO]))
 
YoY = [Total PVO]/[PY PVO]-1 
*question: is it correct to express % ?
 
1 ACCEPTED SOLUTION

@Anonymous 

since your request is YOY, so I only get the year value, if your request is MOM, then we need to add Y/M column. if you don't use if function, the first year's yoy is infinity. That doesnot make sense. usually we set it as blank.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

7 REPLIES 7
ryan_mayu
Super User
Super User

@Anonymous 

do you have a calendar table?

could you pls provide the sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Yes, I have a calendar table which consists of 4 period

SONGHA_0-1627452230271.png

 

and expected output is YoY % per description. I would like to share sample data with you but, it cannot be loaded. Do you know how to upload it?

 

SONGHA_1-1627452339614.png

 

 

@Anonymous 

it's a calendar table. caleandar table is based on day ,not year.

maybe you can share your pbix file via onedrive or others





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

Yes, I tried to put calandar with full date but, raw data doesn't represent a specific date. So I just let only year appear on it. Can you access to this link?

https://drive.google.com/file/d/1rMaPKctmCxFkirgYSSpQreaXr5z-cvOn/view?usp=sharing

@Anonymous 

is this what you want?

pls see the attachment below





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Anonymous
Not applicable

There we go! Thank  you so much, Ryan.

 

I am following my mistakes to see your measure. 

 

You made a calandar table and then set "year" for expression

And blank needs to be replace with a recognized cell. right? 

@Anonymous 

since your request is YOY, so I only get the year value, if your request is MOM, then we need to add Y/M column. if you don't use if function, the first year's yoy is infinity. That doesnot make sense. usually we set it as blank.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.