Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
42 | |
28 | |
24 | |
20 | |
16 |
User | Count |
---|---|
54 | |
35 | |
18 | |
18 | |
15 |