Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
Hi I have a fact table say fact1 and two dim tables dim1 and dim2 both dimension tables are joined with fact table using their dimid.
I need to create a calculated column or measure like if ( dim1.dimid=-1) then dim2.name else dim1.name
I will prefer this new column in fact table, but it can be anywhere.
Thanks
Hi @RG007 ,
Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.
Best Regards,
Eyelyn Qin
Hi @RG007 ,
You could merge these three tables and then use the following formula:
Measure =
IF (
MAX ( 'Merge1'[DimID] ) = -1,
MAX ( 'Merge1'[Dim2.Name] ),
MAX ( 'Merge1'[Dim1.Name] )
)
Or you could creata a new calculated table
Calculated Table =
SUMMARIZE (
'Fact',
'Fact'[Index],
'Fact'[DimID],
"Name", IF ( MAX ( 'Fact'[DimID] ) = -1, MAX ( 'Dim2'[Name] ), MAX ( 'Dim1'[Name] ) )
)
Did I answer your question ? Please mark my reply as solution. Thank you very much.
If not, please upload some insensitive data samples and expected output.
Best Regards,
Eyelyn Qin
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
72 | |
71 | |
69 | |
42 | |
42 |
User | Count |
---|---|
47 | |
41 | |
28 | |
27 | |
26 |