Forum Discussion
To show value without data rows in source data in specific months
- 1 year ago
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:
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.
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.