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
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
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

1 REPLY 1
v-shex-msft
Community Support
Community Support

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

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help 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.