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
nrj1806
Frequent Visitor

Find the difference between aggregated averages to show trend

Hi All,

I have table, that has surveys since last 2 years. I would like to aggregate the NPS column based on date (Please note the surveys were answered on the same day). I need to show an upward arrow if the average NPS increased(greater than 0) from the latest survey as compared to the previous, downward arrow if its the opposite(the difference is less than 0). 

 

How to add dynamic arrows depending on the measure value in Power BI - YouTube shows how to create the arrows. But I am finding difficulty in finding the difference in the average between the last two surveys.

Sample data below:

 OCT 1 average NPS is 7.5.

APR 1 average NPS is 8.

So the NPS has increased.

 

I have the latest average using formula:

 

AVERAGE NPS = VAR endDate = LASTDATE('POWERBISAMPLE'[STARTTIME])
RETURN
CALCULATE(
    AVERAGE('POWERBISAMPLE'[STARTTIME]), 'POWERBISAMPLE'[STARTTIME] = endDate
)
 
How do i find the avergae of the last calendar value?
How do i write the DAX in such a way that i can find the difference?
 
I tried using EARLIER function but wasnt able to figure it out well.

Average NPS.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @nrj1806,

This seems like a common multiple field date range analysis requirements, you can take a look at the following link about the start, end date range analysis.

Before You Post, Read This: start, end date 

Regards,

Xiaoxin Sheng

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @nrj1806,

This seems like a common multiple field date range analysis requirements, you can take a look at the following link about the start, end date range analysis.

Before You Post, Read This: start, end date 

Regards,

Xiaoxin Sheng

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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