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
SUZZ
New Member

How to calculate total cost of consumption from data table as per the rate table and VAT table

Dear sir,

I am newbie to Power BI, did a small basic course from Udemy and jumped in to this world. 

 

Need help to solve my first ever solo personal project:

 

I have set up a relationship as per the picture where I have two data tables that is Electrical readings and Production table.

Season table (SEASTBL) is connected to Readings table through R-Value.

VATTBL is connected to Calender table through Year as a snow flake. Because I found only that way to connect it.

 

RelationshipRelationship

 VATtbl.jpg

 

SEAStbl.jpg

 

In the Readings table, I calculated the KWH from many different ways: (with same results)

 

1) With calculated column:

KWH_CC = 'Electrical Readings'[END]-'Electrical Readings'[START]
2) With Measures:
TOTAL KWH = [FINAL KWH] - 'Electrical Readings'[INITIAL KWH]
 
 
So, from readings table, I need to calculate the total cost based on the R-value of SEAStbl, and multiply it with VAT based on the year.
 
I am very confused how to do it with single or multiple DAX measures?
 
The easy way I found is to add calculated column and do manual work like in Excel, which eventually burried the purpose of automation in POWER BI.
So, I need an expert and simple suggestion how to calculate total cost?
1 REPLY 1
amitchandak
Super User
Super User

@SUZZ , You should get vat into the table need, Instead of calendar join with a year of tables(where you need that)

 

then you can have a new column your table/fact

related(VATTABL[VAT])

 

Or you can create a new column like

 

maxx(filter( 'Electrical Readings', year('Electrical Readings'[Date]) = VATTABL[Year] ) , VATTABL[VAT]) 

 

refer 4 ways to copy data from one table to another
https://www.youtube.com/watch?v=Wu1mWxR23jU
https://www.youtube.com/watch?v=czNHt7UXIe8

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

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.