Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
i have some issue in percentage calcuation .Currently am calcualting two types of values..One is count values percentage and one sum values calcualtion like below.
So,here for count column total is displayed as 101(37+64)..so,percenatge for Category Perecentage of Total is dispalyed correctly..But in commission total is dispalyed like 258479.46...So ..commssion percenatge is calcualted based on these values percentage for Category Perecentage of Total.Why total value for count and Commission is showing differntly...i used below calcualtion for showing values and their grand total values showing as percenatges separtely...
For count =
So,total scalculation is differnt in count and commsiion...Why it is like this?
Solved! Go to Solution.
Hi @NISHA_S,
Believe that your issue is related with the fact that one of the calculations is based on the DISTINCTCOUNT so only considering one value once even if you have the same value twice example is the last line of your information:
and the other calculation is based on the SUM considering the case above your total value will be 16.428.
The totals are based on the context of the measure so your sum for the total is the sum of all the values above you may need to change your measure in order to have the calculation correctly made something similar to:
For commission =
IF (
HASONEVALUE( 'table'[category] ),
CALCULATE ( SUM ( 'table'[commission] ), 'table'[endt_cert] = 0 ),
CALCULATE (
SUM ( 'table'[commission] ),
'table'[endt_cert] = 0
&& 'table'[category] = "Percentage of Total"
)
)
Be aware that may be some variations for it to work on your model based on the setup you have.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @NISHA_S,
Believe that your issue is related with the fact that one of the calculations is based on the DISTINCTCOUNT so only considering one value once even if you have the same value twice example is the last line of your information:
and the other calculation is based on the SUM considering the case above your total value will be 16.428.
The totals are based on the context of the measure so your sum for the total is the sum of all the values above you may need to change your measure in order to have the calculation correctly made something similar to:
For commission =
IF (
HASONEVALUE( 'table'[category] ),
CALCULATE ( SUM ( 'table'[commission] ), 'table'[endt_cert] = 0 ),
CALCULATE (
SUM ( 'table'[commission] ),
'table'[endt_cert] = 0
&& 'table'[category] = "Percentage of Total"
)
)
Be aware that may be some variations for it to work on your model based on the setup you have.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em Português