Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
mdykes
Frequent Visitor

Need some DAX code assistance please!

Hi,

 

I am having some issues with cross column multiplication based on a date filter and a measure. I am requring a column that contains multiple rows of numerous values to be multiplied by a measure. This measure has been filtered by the same thing that the new column will be filtered with. I have tried doing sumx and a filter combined together. Although, I am having little luck. 

 

 

The Total_Fuel_Consumed is the outcome. The Fuel Consumption (L/Hr) is the column that needs to be mulitplied with the measure. The measure is a value of hours for specific items, which it is filtered by a specififed date. Example of table and slicer (below) in reproting view, containing measurement (SMU Total) and corresponding plant_no. 

 

If someone could assist that would be awesome!

2 REPLIES 2
amitchandak
Super User
Super User

@mdykes ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi Amit, I hope this may help clarify.

 

Query 1 is a query containg the tables in the Example. Query 2 is a query containing different information. Currently, the Machine Hour reading table (Screenshot below) is a Measure that is visible in the visualisations tab of Power Bi and contains an Hour reading corresponding to the Machine with a date acting as a filter. This allows me to sum a reading based on a filtered date and corresponding Machine. 

 

The code for this Sum calc for the Hours is below, date filter created with relationship

Hour Total = SUMX(VALUES('XXXXX Vehicle Information'[machine]),[Hour total calc]) ---> 'Measure'

 

mdykes_2-1613346822263.png

 

 

The outcome required is a mulitplication of the Fuel consumption rate column and the Machine Hour reading 'Measure' to create a Fuel used column filtered by a date. This would give a summed value. Would this be a measure?

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.