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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
cbruhn42
Helper III
Helper III

Best Way Possible To Add Specs

So my original data file looks like this:

 

date - lot number - product type - attribute - value

 

My customer has a separate list of specs for product type and attributes.  I'd like to setup a spreadsheet to house the specs by product type and attribute, but also be able to keep track of when those specs change by  the date.  So that when a spec changes it will be reflected on my chart.

 

Any thoughts on how to do this and link the tables in Power BI?

1 ACCEPTED SOLUTION
AmiraBedh
Most Valuable Professional
Most Valuable Professional

I would go for creating a separate table for specs with the following columns:

- Product Type
- Attribute
- Spec Value
- Spec Change Date (to track when the spec was last updated)

This table will contain the specification values for each product type and attribute, along with the date when the spec was updated.

For your relationships :

- Link the Product Type column from FactData to DimSpecs on Product Type.
- Link the Attribute column from FactData to DimSpecs on Attribute.

You need a many-to-one relationship, where FactData (the many side) is linked to DimSpecs (the one side).

If you want to determine Spec Value for each date you may need to Create a CC or measure that pulls the spec value for the relevant date from DimSpecs.
You may want to filter based on the latest Spec Change Date before or equal to the data row date.

 

Spec At Date CC=
CALCULATE(
MAX(DimSpecs[Spec Value]),
FILTER(DimSpecs,
DimSpecs[Product Type] = FactData[Product Type] &&
DimSpecs[Attribute] = FactData[Attribute] &&
DimSpecs[Spec Change Date] <= FactData[Date]
)
)


You can then compare the actual value from your original data with the spec value:

Spec Difference = FactData[Value] - [Spec At Date]

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

View solution in original post

2 REPLIES 2
v-denglli-msft
Community Support
Community Support

Hi @cbruhn42 ,

May I ask if you have gotten this issue resolved?

 If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster .

Best Regards,
Dengliang Li

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

AmiraBedh
Most Valuable Professional
Most Valuable Professional

I would go for creating a separate table for specs with the following columns:

- Product Type
- Attribute
- Spec Value
- Spec Change Date (to track when the spec was last updated)

This table will contain the specification values for each product type and attribute, along with the date when the spec was updated.

For your relationships :

- Link the Product Type column from FactData to DimSpecs on Product Type.
- Link the Attribute column from FactData to DimSpecs on Attribute.

You need a many-to-one relationship, where FactData (the many side) is linked to DimSpecs (the one side).

If you want to determine Spec Value for each date you may need to Create a CC or measure that pulls the spec value for the relevant date from DimSpecs.
You may want to filter based on the latest Spec Change Date before or equal to the data row date.

 

Spec At Date CC=
CALCULATE(
MAX(DimSpecs[Spec Value]),
FILTER(DimSpecs,
DimSpecs[Product Type] = FactData[Product Type] &&
DimSpecs[Attribute] = FactData[Attribute] &&
DimSpecs[Spec Change Date] <= FactData[Date]
)
)


You can then compare the actual value from your original data with the spec value:

Spec Difference = FactData[Value] - [Spec At Date]

 


Proud to be a Power BI Super User !

Microsoft Community : https://docs.microsoft.com/en-us/users/AmiraBedhiafi
Linkedin : https://www.linkedin.com/in/amira-bedhiafi/
StackOverflow : https://stackoverflow.com/users/9517769/amira-bedhiafi
C-Sharp Corner : https://www.c-sharpcorner.com/members/amira-bedhiafi
Power BI Community :https://community.powerbi.com/t5/user/viewprofilepage/user-id/332696

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.