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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Adavin
Regular Visitor

Missing Codes

Hello

Thank you for your time.

I have an issue and would really appreciate your input.

 

I have two table 1) Budget data 2) P&L data

The relationship is on the codes .i.e 1001, 1002

 

My issue is that if within the P&L there is no value against a code the Budget value does not update. I have manually enter the data for a code that has no actual, but has a budget value. But this is time consuming. 

Is there a way that I can say if a code has a budget value but no actual (from the P&L table) show this?

 

Your help is greatly appreciated.

Kindest 

Alice

1 ACCEPTED SOLUTION
krishnakanth240
Resident Rockstar
Resident Rockstar

Hi @Adavin 

Can you try creating calculated table

 

Dim Code =

DISTINCT(UNION(

SELECTCOLUMNS(

'Budget Finanancials Live 24-25 (24-25)',

"Code",'Budget Finanancials Live 24-25 (24-25)'[Detail Code]),

SELECTCOLUMNS(

'P&L',"Code",

'P&L'[Group1_Code])))

Create relationship between Dim Code table to Budget and P&L table with one to many relationship

View solution in original post

3 REPLIES 3
Mohamed32
Advocate III
Advocate III

Create a separate dimension table for all unique codes and use it to connect both the Budget and P&L tables.

Dim Code =
DISTINCT (
    UNION (
        SELECTCOLUMNS (
            'Budget Financials Live 24-25 (24-25)',
            "Code", 'Budget Financials Live 24-25 (24-25)'[Detail Code]
        ),
        SELECTCOLUMNS (
            'P&L',
            "Code", 'P&L'[Group1_Code]
        )
    )
)

Then create:

  • a one-to-many relationship from Dim Code[Code] to the Budget table
  • a one-to-many relationship from Dim Code[Code] to the P&L table

Finally, use the Code field from the Dim Code table in your visuals. This allows Power BI to show codes that have:

  • Budget only
  • Actuals only
  • or both

You may also need to enable Show items with no data in the visual.

krishnakanth240
Resident Rockstar
Resident Rockstar

Hi @Adavin 

Can you try creating calculated table

 

Dim Code =

DISTINCT(UNION(

SELECTCOLUMNS(

'Budget Finanancials Live 24-25 (24-25)',

"Code",'Budget Finanancials Live 24-25 (24-25)'[Detail Code]),

SELECTCOLUMNS(

'P&L',"Code",

'P&L'[Group1_Code])))

Create relationship between Dim Code table to Budget and P&L table with one to many relationship

lbendlin
Super User
Super User

Use the standard "Show items with no data" feature.  

 

lbendlin_0-1778849046116.png

 

lbendlin_1-1778849060252.png

 

 

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors