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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
cj_oat
Helper I
Helper I

To show value without data rows in source data in specific months

Hi,

 

I have 2 tables below that I have already created relationship by using "Time Period" and "Product Group" to map and use "Related ('Table 1'[Count])" to pull value from 'Table 2'

I'm trying to make "1" shows to all month under that "Time Period" and under that "Product Group" but as you may see in the screenshot below which I've highlighted in yellow, some of them shows BLANK since there is no data rows in the source data (e.g. in 'Table 1' for month 2024003, there is no SKU number 34 and 40 while it might available in other months)

 

is there any formula to make it shows the value ?

 

cj_oat_0-1732772698486.png

Table 1    
Product GroupSKUMonthTime PeriodRelated ('Table 1'[Count])
1000012820240032411
1000012920240032411
1000013020240032411
1000013120240032411
1000013220240032411
1000013320240032411
1000013620240032411
1000013820240032411

 

Table 2  
Product GroupCountTime Period
1000011241
1 ACCEPTED SOLUTION
FarhanJeelani
Super User
Super User

Hi @cj_oat ,

To make the "1" appear for all months under a specific "Time Period" and "Product Group," you can use the following approach in Power BI or DAX:

  1. Create a Full Combination Table: Generate a table with all possible combinations of Product Group, SKU, Month, and Time Period. You can do this using a cross-join between relevant columns.

  2. Fill Missing Data: Use the following DAX formula for a calculated column or measure:

 

Count_Filled = 
IF(
    ISBLANK(RELATED('Table 1'[Count])),
    LOOKUPVALUE('Table 2'[Count], 'Table 2'[Product Group], 'Table'[Product Group], 'Table 2'[Time Period], 'Table'[Time Period]),
    RELATED('Table 1'[Count])
)

 

This will pull the Count value from Table 2 if the Table 1 count is blank.

  • Ensure Relationships are Properly Defined: Make sure relationships between Table 1 and Table 2 are active and correctly mapped through Time Period and Product Group.

With this setup, all missing rows in Table 1 will automatically get values from Table 2, ensuring "1" shows up for all months. Let me know if further clarification is needed!

 

Please mark this as solution if it helps. Appreciate Kudos.

View solution in original post

2 REPLIES 2
cj_oat
Helper I
Helper I

Hi @FarhanJeelani ,

 

Thank you so much, it works!

FarhanJeelani
Super User
Super User

Hi @cj_oat ,

To make the "1" appear for all months under a specific "Time Period" and "Product Group," you can use the following approach in Power BI or DAX:

  1. Create a Full Combination Table: Generate a table with all possible combinations of Product Group, SKU, Month, and Time Period. You can do this using a cross-join between relevant columns.

  2. Fill Missing Data: Use the following DAX formula for a calculated column or measure:

 

Count_Filled = 
IF(
    ISBLANK(RELATED('Table 1'[Count])),
    LOOKUPVALUE('Table 2'[Count], 'Table 2'[Product Group], 'Table'[Product Group], 'Table 2'[Time Period], 'Table'[Time Period]),
    RELATED('Table 1'[Count])
)

 

This will pull the Count value from Table 2 if the Table 1 count is blank.

  • Ensure Relationships are Properly Defined: Make sure relationships between Table 1 and Table 2 are active and correctly mapped through Time Period and Product Group.

With this setup, all missing rows in Table 1 will automatically get values from Table 2, ensuring "1" shows up for all months. Let me know if further clarification is needed!

 

Please mark this as solution if it helps. Appreciate Kudos.

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.

Top Solution Authors