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
Fcoatis
Post Patron
Post Patron

% Change in a non contiguous Matrix

I have this matrix with measure Tot Gross = sum(INVEST[Gross Bal]) . How do I calculate the percentual difference of Tot Gross (being calendar non contiguous due to holidays and weekends)?

 

Matrix.PNG

1 ACCEPTED SOLUTION

Hi @Fcoatis,

You can use a measure, please review the following solution.

I have sample data table.

1.PNG

Add index column in Edit Query-> Close & Apply. You will get the following table.

2.PNG

Create a calculated column using the formula.

Last = LOOKUPVALUE(Table9[value],Table9[Index.1],Table9[Index.1]-1)


3.png

Finally, create a measure. For unique date, sum(Table9[value]) equals itself. Create a table visual used to display the result.

Percentage1 = (SUM(Table9[value])-SUM(Table9[Last]))/SUM(Table9[Last])


Capture2.PNG


If you have other issues, please let me know.

Best Regards,
Angelia



View solution in original post

4 REPLIES 4
v-huizhn-msft
Employee
Employee

Hi @Fcoatis,

What's the mean of the percentual difference of Tot Gross, could you please post an example? 

The difference includes increase and decrease between the two numbers you are comparing.

Increase = (New Number - Original Number)÷ Original Number × 100.

Decrease = (Original Number - New Number)÷ Original Number × 100.

In your requirement, what's the New Number and Original Number?

Best Regards,
Angelia

Hi Angelina,

 

I'm looking for a measure that calculates (actual value/previous value)-1

 

PerDiff.PNG

Hi @Fcoatis,

You can use a measure, please review the following solution.

I have sample data table.

1.PNG

Add index column in Edit Query-> Close & Apply. You will get the following table.

2.PNG

Create a calculated column using the formula.

Last = LOOKUPVALUE(Table9[value],Table9[Index.1],Table9[Index.1]-1)


3.png

Finally, create a measure. For unique date, sum(Table9[value]) equals itself. Create a table visual used to display the result.

Percentage1 = (SUM(Table9[value])-SUM(Table9[Last]))/SUM(Table9[Last])


Capture2.PNG


If you have other issues, please let me know.

Best Regards,
Angelia



Thank you Angelia,

 

I think this is the solution. I'll have to adapt to my model in order to have the right sequential index.

 

Best regards

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.