Forum Discussion

dataconsole's avatar
dataconsole
Frequent Visitor
3 years ago
Solved

SUMX Blank Values with Expression using RELATED value

Hello all,

 

i have this formula which was working. After i retouched some parameters in data modeling with Power Query, it doesn't work anymore, though all queries are error free and relations between tables are OK

 

 

Prix Achat = SUMX(FILTER('Transaction Report','Transaction Report'[Type]="Commande"),'Transaction Report'[Quantité]*RELATED(Produits[Prix Achat]))

 

 

 

SUMX = SalesTable, SalesTable[Qty]*RELATED(Products[ProductPrice])

See my database relationships

 



i'm adding the link of my pbix report + 2 tables on excel : https://www.transfernow.net/dl/20230214uQEHtWS7/7118bl8a 

 

does someone see the possible cause ?

 

thank you !

 

Steve

  • Hi, you dont have any matching Product IDs. The relationship between two tables is on Product id and  Numéro de l'objet

     

2 Replies

  • olgad's avatar
    olgad
    Resident Rockstar

    Hi, you dont have any matching Product IDs. The relationship between two tables is on Product id and  Numéro de l'objet

     

  • dataconsole's avatar
    dataconsole
    Frequent Visitor

    Hi olgad 

     

    Thank you ! both columns should contain same numbers, because one has been copied from single values from the other (sales report).

     

    PS: after reviewing it again this morning, the problem came that i formatted one column as Int64.Type in Power Query (though it appeared correctly in power query, once in DAX, it has been formatted with 000000 at the end), don't know why exactly

     

    Thank you again ! i was so confused yesterday i couldn't think clearly

    Have a nice day !

     

    Steve