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

Using the Filter in DAX

Hi there,

 

I've been using basic formulae like the one shown below to give me results based on specific survey types. The example below brings back an average Value for Money score for Adults who stayed in tents and completed a survey.

 
AverageVFMAA = Calculate(average('1819  Data'[Value for money]),Filter('1819 Data','1819 Data'[Survey Type]="Adults Tent"))
 
What I would like to do is something very similar, but rather than working out the average VFM score I would like to work out the average Net Promoter Score.  My Net Promoter score is calculated using the following measure :-
 
Promoter =
CALCULATE ( COUNT ( '1819 TLF Data'[Row_Number] ), '1819 TLF Data'[Recommend] >= 9 )
 
Neutral =
CALCULATE (
COUNT ('1819 TLF Data'[Row_Number] ),
'1819 TLF Data'[Recommend] >= 7
&& '1819 TLF Data'[Recommend]< 9
)
 
Detractor =
CALCULATE ( COUNT ('1819 TLF Data'[Row_Number]), '1819 TLF Data'[Recommend] < 7 && '1819 TLF Data'[Recommend] >0)
 
NPS =
( [Promoter] - [Detractor] )
/CALCULATE ( COUNT ('1819 TLF Data'[Row_Number]), '1819 TLF Data'[Recommend] > 0 )*100
 
 I'm struggling to work out how I would show the Net Promoter Score for for Adults who stayed in tents?
 
Any help would be much appreciated
 
Cheers
 
Paul
1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @paulsmit 

Sample data and expected output would help tremendously. 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Best Regards,
Lin

 

Community Support Team _ Lin
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.