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

Add Last Three Years and %YoY in Matrix Table

Hi All,

 

I'm very new to Power BI, can any one let me know how to derive the below result thru Matrix table?

BI.PNG

1 ACCEPTED SOLUTION

Hi,

 

I believe this is the result you want.  You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

15 REPLIES 15
sukumararumugam
Frequent Visitor

Please note that the years are should be dynamic and not constent. Meaning it should change based on the selection

Hi @sukumararumugam,

 

If you can please provide some sample data with expected result to help us understanding your requirement and coding formula.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Sample.PNG

Hi,

 

In your base data, do you have a Month column?  Or still better, do you have a Date column?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish..

 

You can access the sample from the below link.. Let me if you can't.

 

https://1drv.ms/u/s!AvuiYIpqHEiqgQPpZshW3vvvLs82

 

Thank you so much for your support!

 

Thanks!

Hi,

 

I believe this is the result you want.  You may download my PBI file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Thanks you so much for helping me on this!

 

Can you Please help me in understaning the below function - 

 

DATESBETWEEN('Calendar'[Date],EDATE(MAX(Sheet1[Date]),-3)+1,MAX(Sheet1[Date]))

 

in our case I know the MAX(Sheet1[Date]) will return 4/1/2018 and if I do -3 then it will return 1/1/2018  by adding 1 then 1/2/2018..

as per the above understaning the result will be wrong. However the results on your file is right. So for sure I'm something here can you please help me in understanding.

 

Thank you once again!

 

Sukumar.

You are welcome.  The MAX(Sheet1[Date]) will return the last date of the last quarter.  So, if you have sales data till Q2 of 2018, the MAX(Sheet1[Date]) will return June 30, 2018.  The EDATE() function goes back 3 months.  So the result would be March 31, 2018.  1 added to this will reutrn April 1, 2018.  So the DATESBETWEEN() function will reurn a Table of dates from April 1, 2018 to June 30, 2018.

 

Hope this clarifies.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

But how come MAX(Sheet1[Date]) will return 6/30?? the maximum date in that filed is 4/1/2018

 

 

Max.PNG

 

Sorry not able to catch the function 😞

Hi,

 

The quarters that you see in the column area section of the matrix visualisation are from the Calendar Table (not from sheet1).  The last date of Q2 as per the Calendar Table is June 30, 2018


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Got it!! Thank you so much. Much appreciated!

 

One last question , is there a way to rename the "Total" to "QoQ %" ???

Thanks!

I don't think so.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Sorry for the late reply.. Yes I have Column for each date and also seperate field for Month.

 

 

Thanks!

Also is it possible to get the below view in Power BI, where Q2'QoQ will be dynamic- meaning based on the latest Quarter selected Vs Previous Quarter.

 

View1.PNG

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.

Top Solution Authors