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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Bladimir
Helper I
Helper I

Sum with calculate

Hola

 

Estoy usando medidas calculadas en power bi y obtenido la siguiente tabla:

CHR - KM*SCORE = [SUMA KM (CHR)]*[CHR - SCORE (SIN PONDERACION)]
SUMA KM (CHR) = CALCULATE(SUM('RANKING FACTOR CONDUCCION SEGURA (SOLO CHR)'[KM TOTAL]))
 
EV - KM*SCORE = [SUMA KM (EV)]*[EV - SCORE (SIN PONDERACION)]
SUMA KM (EV) = CALCULATE(SUM('RANKING FACTOR CONDUCCION SEGURA (SOLO EV)'[KM TOTAL]))
 
....
 
ZONAOLKMCHR - KM*SCORE03 HR - KM*SCOREEV - KM*SCOREMP - KM*SCORE10 HR - SCORE*KMDNA - SCORE*KM
BAMBAS449407.74465714.5695777208.063900843557.8440
BAMBAS4521235.75812160.3631102506.272001922655.1560
SUR506027.970437910.30650602797602797554787.0496
NORTE625371.020398533.42220537102364729.0936449098.5944
BAMBAS681212.4766948.5628372247.792031257.3121247121247105246.9268
SUR6815155.5201061439.3970151555215155520
SUR703796.2311673.15467329007.5308379623379623379623379623
ANTAMINA11619104.73019104730191047319104731686459.603
LIMA1168722.61872261 0872261872261824244.1688
NORTE1168507.170249841.33570850717735620.6097698742.936
TOROMOCHO116383.7138371 0383713837138371
BAMBAS11713162.96488478.48861082553.935001299331.7671004306.146
SUR117965.77096577096577965770
CENTRO1203413.873413873413870341387334380.5693277393.972
NORTE12047.46047464746474647460
SUR1201023.58069326.12161010235810235814368.616
BAMBAS1215013.16139306.2213251369.1268201226.985013165013160
CENTRO1213443.050252088.51060344305264944.1495176323.7544
LIMA1211507.96150796 0150796150796150796
NACIONAL12112423.431182049.2112423431212502.36124234312423431178336.614
CENTRO1228478.710423999.4870847871847871647894.1164
NORTE1229438.3900900900900900
BAMBAS1241953.4597272.8485819534501953451953450
NACIONAL1245424.7175358.73802394064.20890542471433841.5923222510.2856
SUR1241253.4824393.1312679627.47751012534812534853358.8156
SUR13519155.501579324.272019155501619027.2271507550.367
BAMBAS1451883.5401883540188354188354132350.256
NORTE1633865.97299115.9271386597386597386597386597386597

 

QUIERO APLICAR AL SIGUIENTE LOGICA PARA OBTENER LA SIGUIENTE TABLA:

 

DESEMPEÑO EV= SUMA (EV - KM*SCORE)  /  SUMA (KM)

DESEMPEÑO CHR = SUMA (CHR - KM*SCORE)  /  SUMA (KM)

DESEMPEÑO MP = SUMA (MP - KM*SCORE)  /  SUMA (KM)

...

 

INDIVIDUOCHR - KM*SCORE03 HR - KM*SCOREEV - KM*SCOREMP - KM*SCORE10 HR - SCORE*KMDNA - SCORE*KM
TODAS LAS ZONAS-OL27.8412203271.0510157412.0189414175.9239764793.9868872557.64896534

 

 

Saludos.

 

 

1 ACCEPTED SOLUTION
kentyler
Solution Sage
Solution Sage

Parece que queire construir una table con un record que contiene sumas para la tabla de ejemplo.

https://radacad.com/creating-a-table-in-power-bi-using-dax-table-constructor

este articulo descirbe como hacerlo in DAX.  Tienia que escribir una medida para cada columna, pero las medidas pueden hacer qualquier calculacion .

 

Soy un personal Power Bi Trainer  aprendo cada vez que respondo a una pregunta

The Golden Rules for Power BI

  1. Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
  2. Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
  3. Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
  4. Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result  to check on your steps along the way.




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


View solution in original post

1 REPLY 1
kentyler
Solution Sage
Solution Sage

Parece que queire construir una table con un record que contiene sumas para la tabla de ejemplo.

https://radacad.com/creating-a-table-in-power-bi-using-dax-table-constructor

este articulo descirbe como hacerlo in DAX.  Tienia que escribir una medida para cada columna, pero las medidas pueden hacer qualquier calculacion .

 

Soy un personal Power Bi Trainer  aprendo cada vez que respondo a una pregunta

The Golden Rules for Power BI

  1. Use a Calendar table. A custom Date tables is preferable to using the automatic date/time handling capabilities of Power BI. https://www.youtube.com/watch?v=FxiAYGbCfAQ
  2. Build your data model as a Star Schema. Creating a star schema in Power BI is the best practice to improve performance and more importantly, to ensure accurate results! https://www.youtube.com/watch?v=1Kilya6aUQw
  3. Use a small set up sample data when developing. When building your measures and calculated columns always use a small amount of sample data so that it will be easier to confirm that you are getting the right numbers.
  4. Store all your intermediate calculations in VARs when you’re writing measures. You can return these intermediate VARs instead of your final result  to check on your steps along the way.




Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.