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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
nchandran
Helper I
Helper I

Need assistance on Formula

Currently i have three tables A,B,C. Table A is for computer deployment quantity, Table B for computer stock and Table C for computer cost.

I had to create a measure to calculate the cost of the computers thats being deployed, the formula goes like this 

TableA[Dell Laptop]*2630 + TableA[IBM Laptop]*1400 . The computer cost is a changing catalogue price and its manual to keep updating the price on the formula. On the Table C we have the laptop cost, is there a way we can dymanically add the cost from this table on to the formula much like this TableA[Dell laptop]*Table C cost + TableA[IBM Laptop]*Table C Cost?  
Someone please enlighten me.

 

1 ACCEPTED SOLUTION

HI @nchandran,

Perhaps you can do unpivot column on your value fields to convert them to attribute and values, then you can simply mapping table records based on the model field and use the current value as a condition to calculate.

Unpivot columns (Power Query) (microsoft.com)
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

5 REPLIES 5
lbendlin
Super User
Super User

What you are looking for is called a "data model"  and it consists of tables that are linked by common columns (called "keys").  Some of the tables are considered "dimensions"  (stuff you filter by) and some are considered "facts" (stuff you calculate). 

 

Identify the common fields between your tables and create your data model according to the business question you are trying to answer.

Thank you but i believe i've already passed that stage , the current formula is perfect except im looking to replace those manual inputs with automatic updates. For instance if i change the cost in the sharepoint when i perform a refresh the cost formula will put the changes. I'm not sure how to write that formula.

The screenshots show what I mean here.

nchandran_0-1634874183294.png

nchandran_1-1634874193891.png

nchandran_2-1634874227237.png

 

 

Correct your data model. The dimensions need to be in a 1:* relationship with the fact table, and a single filter direction.

I've change as suggested, i need help on the formulat for column measure where

ADCS[Precision5560]*2630 + ADCS[Latitude5420]*1400, the bolded units should be pulled from the Cost table where under model column the cost should be selected in that row. Please refer to the photos and we seek your guidanceFact table picks the cost table based on model and cost.jpgADCS COst table.jpg on this.

HI @nchandran,

Perhaps you can do unpivot column on your value fields to convert them to attribute and values, then you can simply mapping table records based on the model field and use the current value as a condition to calculate.

Unpivot columns (Power Query) (microsoft.com)
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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