Power BI: Missing Relationship or DAX query needed?


New Member
May 15, 2019
Hello everyone!

Hope you can help me on this
Here's the problem: I'm trying to automate wih power BI something that takes me 4 hours to do.

In a first source I get the following information (Excell file)
* Reference number
* Reference date
* Customer
* Country
* Duration in minutes
* Number of days (if = 1, then the problem occurred just at the reference date, otherwise, it lasted for 2, 3 or more days - days are before and on reference date)

So, I'm copy/pasting by hand from another tool the info below in uppercase in order to have a complete table like this:
* Reference number
* Reference date
* Customer
* SUPPLIER (NB: the suppliers I worked with on the reference date)
* Country
* Duration in minutes
* PURCHASE PRICE (average price over the number of days between (reference date - number of days) and (reference date))
* SALE PRICE (same remark)
* Number of days

By launching on PowerBI:
1 * I import my first table.
2 * I import the uppercase elements from the second table.
3 * I made a correspondence table because in my 2 databases, my clients do not have the same name
Still not walking with reports ...
I made a table apart with the days, a table supplier, and I tried all combinations I could ... still not working.

So, I thought a DAX request might help me.

In natural language, that would be:
In the first table, For (Reference Date), for this (Customer), to this (Country)
Please Mr Power BI, give me: the list of (SUPPLIERS) with for each of them, the (SELLING PRICE) and the (PURCHASE PRICE)
and please Mr Power BI, this price should be the average price between (date of reference - number of days) and (date of reference).

Except that in DAX, I could not make it.

So, can PowerBI solve my problem without DAX (in this case, there must be a relationship problem I presume)?
Or should I write a DAX query? And there, I face problems...

Thanking you for your help
In exchange, I know how to make "clafoutis"! :)

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...