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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bsheffer
Continued Contributor
Continued Contributor

where to modify to create a weighted measure

I have a number of measures that are used to determine yoy percentages.  I'd like to apply a weighted average to them.  So where do I do the modification of adding count/count all(YTD) to the totals?

 

just make a new measure like this?

sumx(

[______RELATIVE YR 0 % yoy CB_AMT (YTD)] 

-- a percent yoy measure (cb amt/sales amt) - (prior yr cb amount/prior yr sales amount) /  (prior yr cb amount/prior yr sales amount)

* convert([______RELATIVE YR 0 CB_count (YTD)], double)

/ convert([______RELATIVE YR 0 CB_count (YTD) ALL], double) --uses all() and counts for entire year

)

 

or do I have to apply this at the most basic level where I first sum the CB amounts and before I do subtraction and divisions.

 

all these are compared over time in line or bar graphs.

 

right now it just comes back with an apparently empty visual.  [______RELATIVE YR 0 % yoy CB_AMT (YTD)] works fine before modification.

2 REPLIES 2
bsheffer
Continued Contributor
Continued Contributor

I'm trying to identify those who have had a significant change over time series.  Some of these accounts just had 1 donation for a large amount so that would seem a lot of change.  by applying a weighted average I can reduce this effect on the time series when I total their sums. 

 

But I'm doing a lot of percentage comparisons which is why I want to know where I need to apply the weighted average.  It would be nice if I could just do it to any measure but I'm sure that's a pipe dream.

 

Hi @bsheffer ,

Sorry for replying late. If you want to calculate the weighted average in your measure, you can refer these simliar issues:

  1. Weighted Average from Measures  
  2. Need help calculating weighted average  

 

If not help, you can consider sharing some sample data and expected output for further discussion, that would help you better to solve this issue.

 

Best Regards,
Yingjie 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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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