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

Trailing Average & Previous Quarter Average

I have this data:

1.PNG 

What I'm trying to do with this data is:

 

1. Figure out how to make trailing 12 month average on my [Positive %] measure. It is a measure that simply goes through my fact table and counts the number of what's considered positive feedback:

1.PNG

1.PNG 

 

2. Figure out how to calculate what the average positive % was for the previous quarter (Qtr 1) using the trailing 12 month averages that have been calculated.

 

I have an inactive relationship setup between my fact and date table. It's set up this way so other formulas from other tables are not impacted. I've tried setting up a 1 to many relationship, but it causes other pieces to break so I'd rather not do it that way if I can help it. Thanks!

2 REPLIES 2
v-jiascu-msft
Employee
Employee

Hi @Anonymous,

 

Please refer to Desktop/Trailing-12-Month-Average. It will give you some ideas. Can you share a dummy sample? Since the [Positive %] is a measure, I can't recreate it in my test.

 

Best Regards,

Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-jiascu-msft,

 

I attempted to attach a sample of my data but I don't see a place on here to attach spreadsheets. Here's a screenshot of what I'm working with:

1.PNG

 

So the breakdown:

1. These are survey results. The columns are questions that were asked in the survey. Values are the answers from the users.

2. I was first tasked with grouping and counting everything that is considered a "positive" response. Positive responses consist of Strongly Agree, Agree, Happy, Very Happy.

3. In order to achieve this, I took all columns with these values andn unpivoted them so everything was in one column. This makes it easier to count.

4. So to get the positive %, I had one measure that counts the "positive values" and one measure that counts all values whether they are positive, negative or neutral. Then simply did [Positive Count/Total Count].

5. From here, I am stuck on getting what the average % is:

1.PNG 

 

It keeps coming out 100% no matter how I set it up. After I figure out how to get the overall average, I then need to figure out how to have this as a trailing 12 month average so I can see how it is trending over time. Then the last step using my trailing 12 month average numbers, is getting the overall average for the previous quarter.

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.