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

How to calculate sum of calulated measure?

Hi, I want to Calculate a measure %Sale Share.

The formula of Measure %Sale Share = Average of FY2020/Sum of Average FY2020.

Now, Average is a calculated measure.

I want to calculate the Sum of Average only for FY2020 so that I can calculate %Sale Share.

 

 

I also want to calculate A monthly moving average YTD.

 

Please help. This is an urgent issue.

 

Thanks in Advance.

 

  

1 ACCEPTED SOLUTION

Hi @Anonymous 

Create measures

avg_2020 = CALCULATE(AVERAGE(Table2[value]),FILTER('date','date'[year]=2020))

%Sale Share = [avg_2020]/SUMX(ALL(Table2[area]),[avg_2020])

Capture4.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous , to have sum you need to have row context. Like I used month year. Use the correct column in place of month year

 

new meausre = sumx(values(Table[Month-year]),[%Sale Share])

Anonymous
Not applicable

Hi Amit,

 

I want to calculate %Sale Share as a measure in that:

 %Sale share = Average of FY2020/Sum of Average FY2020

Numerator=Average of FY2020

Denominator=Sum of Average FY2020

AreaAvg of FY2020 = Calculated Measure%Sale Share
A1=1/10=0.1%
B

2

=2/10=0.2%
C3=3/10=0.3%
D4=4/10=0.4%
Total10=10/10=100%

 

Like this I want to calculate %Sale share.

 

Thanks in Advance

Hi @Anonymous 

Create measures

avg_2020 = CALCULATE(AVERAGE(Table2[value]),FILTER('date','date'[year]=2020))

%Sale Share = [avg_2020]/SUMX(ALL(Table2[area]),[avg_2020])

Capture4.JPG

Best Regards
Maggie
Community Support Team _ Maggie Li
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.