Forum Discussion
Problem with GROUP BY / SUMMARIZE functions
Hello everyone,
I have two tables : 1 with my inventories (inventories = STOCKS[Stock à utilisation libre]) associate with a date and another table with my prices (PRIX).
I would like to calculate my inventories value without merged those tables). So in oder to do that I think that I could use GROUP BY or SUMMARIZE function.
I would like to have inventories value = inventories * price group by date and product. But I did manage to do that (I don't understand clearly what I should put in my function)
Maybe using those functions is not the good way to do that buI'm lost
Thank you in advance for your help,
Have a good day,
Salomé
- Anonymous4 years ago
Hi Sthrn ,
You could create a relationship in the Power BI Desktop.
Then create the following measure.
inventories value = SUM('PRIX'[Prix standard])*SUM(STOCKS[Stock à utilisation libre])Create and manage relationships in Power BI Desktop - Power BI | Microsoft Docs
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- lbendlinSuper User
You have a couple of options
- "merge" the tables in Power Query. That's called denormalizing
- let the data model do the work for you - in Power BI link the tables by a common field, and indicated the filter flow from dimension to fact
- use disconnected tables and use LOOKUPVALUE or TREATAS to find the matches
The second option is nearly always preferable. Let the data model do the work.
- AnonymousNot applicable
Hi Sthrn ,
You could create a relationship in the Power BI Desktop.
Then create the following measure.
inventories value = SUM('PRIX'[Prix standard])*SUM(STOCKS[Stock à utilisation libre])Create and manage relationships in Power BI Desktop - Power BI | Microsoft Docs
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.