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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
PBI_newuser
Post Prodigy
Post Prodigy

Lookup Value from Dimension table

Hi, how to create a DAX to have column "Version" and "Upgrade" in Fact table?

 

Dimension Table:

ProductAttribute NameAttribute Value
AVersionV-1
AUpgradeU-2
BVersionV-2
BUpgradeU-3
CVersionV-1
CUpgradeU-1

 

Fact Table:

ProductAccountCountryVersionUpgrade
ACompany XUSAV-1U-2
BCompany YCanadaV-2U-3
CCompany ZGermanyV-1U-1
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @PBI_newuser 

Please try

Version = CALCULATE ( MAX ( TableA[Attribute Value] ),TableA[Attribute Name] = "Version" )
Upgrade = CALCULATE ( MAX ( TableA[Attribute Value] ), TableA[Attribute Name] = "Upgrade" ) 

1.png2.png

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @PBI_newuser 

Please try

Version = CALCULATE ( MAX ( TableA[Attribute Value] ),TableA[Attribute Name] = "Version" )
Upgrade = CALCULATE ( MAX ( TableA[Attribute Value] ), TableA[Attribute Name] = "Upgrade" ) 

1.png2.png

ribisht17
Super User
Super User

Hi @ribisht17 , i am not sure how to create the column as I need to pull the attribute name as column name.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.