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.
Hey guys,
So in my power bi report, I have a measure which is the difference between two percentage measures.
NPS % = Promoter % -Detractor %
And I want them to calculate as 0 decimal places. I am able to show individual Promoter % and Detractor % as 74 % and 5 % but the difference is coming out incorrect. I have tried setting 0 in the measure tools for all measures but it's still showing 2 decimal values when i enable it in data label. I tried to set decimal places to 0 from the modelling view also but it still not coming correct
Please need help
Promoter_% =
Var MaxYear=MAX('Fiscal Years'[FY])
Return
IF(ISFILTERED('Fiscal Years'[FY]),DIVIDE(CALCULATE(DISTINCTCOUNT('Responses received'[Dummy ID]),'Responses received'[Q1]>=9),[Total_Responses],0),
CALCULATE(DIVIDE(CALCULATE(DISTINCTCOUNT('Responses received'[Dummy ID]),'Responses received'[Q1]>=9),[Total_Responses],0),'Fiscal Years'[FY]=MaxYear))
Detractor % =
var maxYear=MAX('Fiscal Years'[FY])
Return
IF(ISFILTERED('Fiscal Years'[FY]),DIVIDE(CALCULATE(DISTINCTCOUNT('Responses received'[Dummy ID]),'Responses received'[Q1]>=0 && 'Responses received'[Q1]<=6),[Total_Responses],0),
CALCULATE(DIVIDE(CALCULATE(DISTINCTCOUNT('Responses received'[Dummy ID]),'Responses received'[Q1]>=0 && 'Responses received'[Q1]<=6),[Total_Responses],0),'Fiscal Years'[FY]=maxYear))
NPS_% =
Var maxYear=MAX('Fiscal Years'[FY])
Return
IF(ISFILTERED('Fiscal Years'[FY]),
IF([Total_Responses]>0,[Promoter_%]-[Detract %]+0,
IF(([Promoter_%]-[Detract %])=0,"-",[Promoter_%]-[Detract %]
)
),
IF([Total_Responses]>0 && ([Promoter_%]-[Detract %])=0 ,0,
CALCULATE(IF(
([Promoter_%]-[Detract %])=0,"-",[Promoter_%]-[Detract %]
),'Fiscal Years'[FY]=maxYear
)
))
Hi @Anonymous ,
You can try this. Put the decimal place to 0.
Regards,
Harsh Nathani
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
39 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |