Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Using a column from another Table

Hi everyone,    I'm trying to use two rather simple table to make a report, here is the steps I've done so far after loading my data: 1- set a relation between two tables (Between: Tableau2['fourn...
  • v-xiaotang's avatar
    v-xiaotang
    4 years ago

    Hi Anonymous 

    I thought DAX could not handle this situation, but after I studied your data structure again, I found that DAX can still handle it. 

    The principle of DAX is to take the intersection with the red part in the figure, and then sum it.

    Dax code:

    test = //measure
        var _t1= SELECTCOLUMNS(FILTER(ALL(Tableau2),Tableau2[Année]=MIN(Tableau2[Année]) && Tableau2[Mois]=MIN(Tableau2[Mois])),"s",Tableau2[fourniseur + month])
    return CALCULATE(SUM('Qtité_livré'[Nbre de commandes]),INTERSECT(VALUES('Qtité_livré'[Fourn. & Month]),_t1))

     

     

    Best Regards,

    Community Support Team _Tang

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