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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
anileshknpowerb
Helper III
Helper III

Conditional join in Power BI

Hi All,

 

I have star schema with 8 Dimension tables and 1 Fact table.All joins are straight forward,except the below one.

 

Fact_W_AR_BALANCE_F.BALANCE_DT_WID <= Dim_W_MCAL_PERIOD_D_Current_Period.MCAL_PERIOD_END_DT_WID
AND Fact_W_AR_BALANCE_F.MCAL_CAL_WID = Dim_W_MCAL_PERIOD_D_Current_Period.MCAL_CAL_WID
AND Dim_W_MCAL_PERIOD_D_Current_Period.ADJUSTMENT_PERIOD_FLG ='N'
AND Dim_W_MCAL_PERIOD_D_Current_Period.W_CURRENT_MCAL_PERIOD_CODE = 'Current'

 

Please help me how to it in power BI.

 

Thanks in Advance.

3 REPLIES 3
amitchandak
Super User
Super User

@anileshknpowerb , you can have such; in a measure or when you create a new table.

Refer Measure: https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

 

Refer Join: https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/

 

 

 

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

@amitchandak , thanks for your prompt response.

I want it as two separate tables,the reason end user will use for Adhoc reporting.

 

Currently the above join condition is present in OBIEE which we are planning to implement in POWER BI.

Even i cannot have it in measures,reason i am having one more Date Dimension and the joins looks like below.

 

Fact_W_AR_BALANCE_F.BALANCE_DT_WID = Dim_W_MCAL_DAY_D_Fiscal_Day.MCAL_DAY_DT_WID AND
Fact_W_AR_BALANCE_F.MCAL_CAL_WID = Dim_W_MCAL_DAY_D_Fiscal_Day.MCAL_CAL_WID AND
Dim_W_MCAL_DAY_D_Fiscal_Day.ADJUSTMENT_PERIOD_FLG = 'N'

 

 

Thanks..

@anileshknpowerb , for equal join You Concat two or more columns   and create a new column on both sides.

Like on one side concat ADJUSTMENT_PERIOD_FLG  and another side you can only have value N

New columns

Key = Column1 & "-" & Column2 & "-" & Column3

 

Key = Column1 & "-" & Column2 & "-N"

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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