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

I need Difference in new row when i change the year or month or slicer, please help

I need Difference in new row when i change the year or month, please help Puz.jpg

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @sondhboyz 

According to your description, you want to "Difference in new row when i change the year or month or slicer".

First of all, if you want to insert a difference in each row in Matrix and be affected by the slicer, which is difficult to achieve in Power BI, you need to build a new dimension table that contains the difference names of your different rows . Then use metrics to achieve your needs.

If you don't need a slicer, you can also refer to the following blog:
Difference between two rows in Power BI - Analytics Tuts (analytics-tuts.com)

Calculate difference between two rows in Power BI - Bing video

If you only need to calculate the difference between the two head and tail dates of the slicer, you can use the MAX() and MIN() functions to get the selection value of the slicer, and then create a virtual table to get the values corresponding to the year and month, and then subtract them.

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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.