1

I have two data tables that I want to import into power bi and create a summary dashboard for it. One table is called 'Fuel Consumption Table' and it has the following fields: Name of the person dispensing fuel, Date Fuel was dispensed, Asset Type, Amount of fuel Dispensed (liters). The other table called 'Fuel Purchases Table' has the following fields: Date fuel was purchased, Cost of Fuel, Volume of Fuel Purchased. The aim of this dashboard is to analyze the amount of fuel consumed by the assets within a specified period of time given by the dates of fuel purchases. how do I create a relationship between these two tables to achieve the desired effect. Quite new in power bi.enter image description here

I have tried setting relationships for the two tables. I want to perform weekly, monthly, and quarterly analysis of the Fuel Consumption data table based on the dates of the fuel purchased table. I have created a dashboard and inserted a card tile and a chart tile with the asset types as the legend. however, when I change the asset, the card tile goes blank. I'm thinking that it may be that there's no relationship between my two data tables.

1 Answers1

0

I would create extra tables that would have some date-related common fields and work with them in dashboard.

You can use DATEPART() for that. It can return 'identifiers' for all the intervals you are interested in: week, month, quarter. For example: SELECT DATEPART(ww, Fuel_Date) AS Week_Id, * FROM Fuel_Consumption;.

You could add to dashboard some aggregated view of these tables: SELECT Name, Asset_Type, Week_id, SUM(Amount) GROUP BY Name, Asset_Type, Week_id FROM ....

edixon
  • 991
  • 6
  • 16