Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Help modeling situation "sample"

Buenas tardes, quisiera consultar por algo muy especifico pero que quizás es mas simple de lo que parece.

 

En resumen tengo 2 tablas:

1. Donde se van registrando los pedidos de venta y datos generales de esta, en especifico los kilos entregados

2. Se van registrando los costos asociados a cada pedido de venta, para 1 pedido de venta pueden haber muchos costos asociados dependiendo del desglose que uno quiera utilizar, en mi caso generalmente para cada pedido de venta hay 3 costos, costo terrestre, costo aereo, y costo documental(asociado al transporte aereo)

 

Aqui van mis dos tablas de ejemplo:

 

Tabla 1:

PVKILOSDESTINOFECHASMEANA
15000CHINA442072
22000USA442072
33000USA442082
42500CHINA442082
58000PERU442092



Tabla 2:

PVTIPO TRANSPORTEEMPRESA TRANSPORTETIPO COSTOCOSTO
1103GLATRANSPORTE800
2103GLATRANSPORTE200
1104LATAMTRANSPORTE3000
2104QATARTRANSPORTE2500
1104ARTURO PEREZDOCUMENTAL300
2104ARTURO PEREZDOCUMENTAL300
3103VASQUEZTRANSPORTE600
4103VASQUEZTRANSPORTE300
3104QATARTRANSPORTE3000
4104LATAMTRANSPORTE2500
3104ARTURO PEREZDOCUMENTAL300
4104ARTURO PEREZDOCUMENTAL300
5103GLATRANSPORTE800
5104LATAMTRANSPORTE6000
5104ARTURO PEREZDOCUMENTAL300

 

La medida que quiero en general es la que me calcule el costo por kilo ($/kg), y que pueda utilizarla para los distintos filtros de la tabla de costos, por ejemplo, querer ver por transporte tipo 103, sus rate,

 

 
EMPRESA TRANSPORTESuma de COSTOkilos2$/kg
CONTOPSA800205000,04
GLA1000205000,05
VASQUEZ900205000,04
Total general2700205000,13
 

No logro entender porque para cada tranposrte dice que son 20500 kilos, y por lo tanto calcula mal el rate, debería ser para Contopsa sólo 8000 kilos (ya que el transporte contopsa sólo lleva la PV 5), para Vasquez 5500 kilos ya que esta solo lleva la PV 3 y 4,

 

Me podrían ayudar a entender que estoy haciendo mal? me falta crear otra tabla para unir ambas?, estoy conectando ambas tablas sólo por la PV

 

Muchas gracias, mi cel es 56981598377, estoy disponible para recibir comentarios por wsp si gustan.

  • Hi, Anonymous 

    According to your sample data and the expected result, I found that there occurs a little problem in your sample data. The value I circled should be “CONTOPSA”, right?

    Then I created a One to many, Both filter on these two tables, like this:

    And I created a Matrix and a Slicer and place them like this:

     

    And I guess this is what you want.

    You can download my test pbix file here

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

3 Replies

  • Hi Anonymous  you need to create a relationship between both table by the PV that way you will get expected result.

     

    In the example data you give things don't exatly match with the information you provide but has you can see the quantities match and therefore the price per kg.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hola, Lamentablemente no me sirve mucho, me gustaría que resumiera por transporte y no me aparezcan 3 lineas iguales son el mismo transporte.

       

      Cómo podría hacerse?

  • v-robertq-msft's avatar
    v-robertq-msft
    Icon for Community Support rankCommunity Support

    Hi, Anonymous 

    According to your sample data and the expected result, I found that there occurs a little problem in your sample data. The value I circled should be “CONTOPSA”, right?

    Then I created a One to many, Both filter on these two tables, like this:

    And I created a Matrix and a Slicer and place them like this:

     

    And I guess this is what you want.

    You can download my test pbix file here

     

    If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

    How to Get Your Question Answered Quickly 

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.