Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Calculate percentage of hours of each people and it must be 100%

Good morning,

 

I need help, because I can´t get that this dashboard works. I have a lot of people, and I need to calculate the percentage of hours from each of the total hours from each. Also, I need the result without decimals, because I need in text format.

 

The problem is, when the result appears apparently is OK, when I download the report, el value has a lot of decimals, and when I round this values, the total % form each is up or down of 100%. The minimal value must be 1 and the maximum value must be 100.

 

And the most frustrating is that the total value in the dashboard appears 100% but if you add all values the result isn´t 100%. The total value must be the number of people I have multiplied by 100, because form each will have 100%.

 

For example:

The DAX formula is the next: 

 

% Oct 17 = 100 * DIVIDE(SUM('Informe'[Oct 17]);CALCULATE(sum('Informe'[Oct 17]);ALL('Informe'[Profesional]);ALL('Informe'[Contraseña])))
  • Profesional
ContraseñaOct 17Nov 17Dic 17
00001Contra_163986388888888800,0063986388888888800,0063986388888888800,00
00001Contra_2452,00452,00452,00
00001Contra_319999972222222200,000,000,00
00001Contra_410999872222222200,0010999872222222200,0010999872222222200,00
00001Contra_510597944444444400,000,000,00
00001Contra_6130,00130,000,00
00001Contra_7985,00985,000,00
00001Contra_814285714285714200,000,000,00
00001Contra_9310,00310,000,00
00001Contra_1018224522222222200,0018224522222222200,000,00
00001Contra_1156405714285714200,000,000,00
00001Contra_1268571428571428500,000,000,00
00001Contra_135299997222222220,0050476164021164000,000,00
00001Contra_1419559997222222200,0019559997222222200,0019559997222222200,00
00001Contra_15620,0029523809523809500,000,00
00001Contra_1611899997222222200,0011899997222222200,0011899997222222200,00
00001Contra_17166,00166,00166,00
00001Contra_18174,00174,00174,00
00001Contra_1960,0060,0060,00
00001Contra_2060,0060,0060,00
00001Contra_2122799972222222200,0022799972222222200,0022799972222222200,00
00001Contra_22308,00308,000,00
00001Contra_23193,00193,00193,00
00001Contra_246612,006612,006612,00
00001Contra_258999997222222220,008999997222222220,008999997222222220,00

 

Thanks for the help,

Mayte

Status: New
Comments
v-qiuyu-msft
Community Support

Hi @Anonymous,

 

What exactly do you mean? When I use your sample data and DAX to create a measure, the total value is 100, all % Oct 17 values are totaled to 100 as well. Would you please share some screenshots to clarify where the issue is? 

 

w3.PNG

 

Best Regards,

Qiuyun Yu 

Anonymous
Not applicable

Hello @v-qiuyu-msft,

 

The problem is that the total value is incorrect, because when you add every value with a calculator, the total value is not correct. And when you download the report in excel, and see the values in a dinamic table, the total value of each employee, in some cases, are up or down to 100%.

 

Best Regards,

Mayte

v-qiuyu-msft
Community Support

Hi @Anonymous,

 

It seems that you calculate total from all % Oct 17 row values and yo don't get the exact 100 result, right? 

 

The issue should be each % Oct 17 row value is rounded, eg: 1.234 rounded in 2 decimal place then becomes 1.23 which is less than actual one. 

 

Best Regards,
Qiuyun Yu 

Anonymous
Not applicable

hi @v-qiuyu-msft,

 

It is exacly that you are talking, the problem is that I don´t get the exact 100 result, and I would need or the 100% exactly result or get a function which read the result and add or subtract the values and modifify them to get the 100% exactly result.

 

I was thinking to get this using macro in excel, but I think that I would mix two things (macros/Power BI) and there must be something that I can do in power bi to get it.

 

Best regards, and thank you very much for your interest and your time,

Mayte