Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
apatwal
Helper III
Helper III

Weekly sum of Percentage Value

Hi Everyone,

 

I am facing issue which I will explain here.

Below is the screenshot which shows percentage values.

Delta difference is difference beteen change in Price% - Change in Cost %

apatwal_0-1643460501323.png

 

If I want to take weekly wise sum of Delta difference then this is not showing up actually.

apatwal_1-1643460628624.png

As shown in above screenshot, January 18 should be sum of all delta difference values for Jan 18 but it is giving us 4.8% which it should not be.

 

Could someone please help me on this?

1 ACCEPTED SOLUTION

@apatwal 

I recommend cheking out this post by SQLBI: https://www.sqlbi.com/articles/working-below-a-dax-formulas-granularity/
explaining how to deal with these kinds of granularity changes. If this still doesn't help you to solve the issue. I request that you add sample data in table format and ping me with @. 





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

Proud to be a Super User!




View solution in original post

5 REPLIES 5
ValtteriN
Super User
Super User

Hi,

What is the dax you use for Delta difference? I think by using SUMX you can get the value you want.





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

Proud to be a Super User!




Hi,

The DAX used in as below:

Delta Difference = [Change in Price %] - [Change in Cost %]
where Change in Price % = (SUM(table[Revenue]) - SUM(table[Price_2020]))/(SUM(table[Price_2020]))
 
Change in Cost % = (SUM(table[Cost_2021])-SUM(table[Cost_2020]))/(SUM(table[Cost_2020]))

Okay,

The issue here is that your % measures are beign calculated in the context of "week start date". This means that e.g. change in price % calculates the sum of values where [week start date] = 1.18.2021 for example. These sums are then used to calculate a single value for change %. To counter this I recommend using SUMX in your Delta difference: https://docs.microsoft.com/en-us/dax/sumx-function-dax





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

Proud to be a Super User!




Hi,

 

Thanks for your reply!

 

I performed as it was suggested but it doesn't help me to acheive.

DAX used for delta difference:

Delta difference = SUMX(table,[Change in Price %] - [Change in Cost %])
But here, it is showing NaN values also.

apatwal_0-1643464870947.png

 

@apatwal 

I recommend cheking out this post by SQLBI: https://www.sqlbi.com/articles/working-below-a-dax-formulas-granularity/
explaining how to deal with these kinds of granularity changes. If this still doesn't help you to solve the issue. I request that you add sample data in table format and ping me with @. 





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

Proud to be a Super User!




Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.