Forum Discussion

ania_roh's avatar
ania_roh
Helper III
5 years ago

help with dax

Hello,

I really need your help with DAX formule, because I´m trying to do something but I don´t exacly what kind of function I should use. I appreciate if you could help me with that.

Firstly, my model is like that:

 

 

Resuming, all of the tables I'm using here, have relationship with the table of " proyectos", and the relationship goes with " ID of the proyect". 

 

So, secondly:

The most important thing is the table of " proyectos consecuentes". That table has id of proyect (witch is  the previous proyect) and then, it has the column of "proy cons" which is the next proyect, so it means that the "previous proyect" converts to "the next proyect" (when the previous proyect is finished or accepted).

the table is like that: 

 

 

As an example: The id proyect 3953 converts into  id proyect 4472, when it is accepted (or finished), so the continuation of the proyect 3953 is  the proyect 4473. The proyect 3910 has many "proyectos consecuentes" so it means that the goal is to find the sum of all of that proyects 

 

Finally, I´ve created that visualization: 

 

 

 

When:

 

Id proyectos consecuentes = CONCATENATEX('PROYECTOS CONSECUENTES', 'PROYECTOS CONSECUENTES'[Proy. Cons], ", " )
 
But now, the last thing:
 
I need to calculate that measure and put it in my visualization, but only for "proyectos consecuentes" and I want to put it in my visualization too:
 
 
 
 
 
 
 
I mean, for example:
 if my proyect Id (previous one) is 2382, then I have three "next proyects" which is 759,639,1512. 
So I would like to put another column in this this visualizations which calculates this measure but only for 759, 639 and 1519 but without 2382. 
¿How can I do that?
 
Thank you so much in advance.
 

4 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey ania_roh ,

     

    maybe check the PATH function in DAX.

    This is giving you a parent-child hierarchy, or in your case all the following projects.

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

    Best regards
    Denis

    Blog: WhatTheFact.bi

  • Yes selimovd, but all of them are ID proyect, so I don´t really know how to use it. 

     

    I would like to transform the second column of this : 

    in different values: for example:

    for 3191:

    the value 1 : 1937

    the value 2: 3614,

    the value 3: 4083,

    the value 4: 4099,

    the value 5: 4100,

    the value 6: 4100,

    the value 7: 4100

     

     

    And then I would like to tell to power bi :

    Don´t take 3191, but 

    take 1937, 3614, 4083, etc 

    and calculate that measure for all of that instead of 3194...

     

    I don´t know if you understand what I mean

     

     

     

     

  • The measure I would like to calculate is the one I´ve wrote before:

     

  • selimovd I'm really beginner in that kind of things, so I didn´t get excactly what you meant. 

    Could you explain it more please?