Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I would like to multiply the 2nd table to kilos base on it's category. Unfortunately, since 11/07/2025 orginally doesn't have a data it won't show the kg convertion.
Current measure that I have is:
Solved! Go to Solution.
Hi @non23
That’s likely because the category refers to a row that doesn’t exist. For example, on November 7, a specific category might not have an entry in your data. So while the rolling average returns a value, there’s no corresponding value for the conversion factor.
A more reliable approach would be to use dimension tables—one for dates and one for categories. The date dimension should contain all dates without gaps. Then, base your calculations on those dimension tables using the relevant columns. Examples:
Rolling Avg Sales =
CALCULATE (
AVERAGEX ( VALUES ( Dates[Date] ), [Sum of Sales] ),
DATESINPERIOD ( Dates[Date], MAX ( Dates[Date] ), -2, DAY ),
REMOVEFILTERS ( Dates ) --- not necessary if Dates have been marked as date table.
)
Rolling Avg Sales Converted =
SUMX (
SUMMARIZECOLUMNS (
Dates[Date],
ConversionFactor[Category],
"@converted", [Rolling Avg Sales] * CALCULATE ( SUM ( ConversionFactor[ConversionFactor] ) )
),
[@converted]
)
You can see in the sc reenshot below that as long as rolling average has a value, so does the converted.
Please see the attached pbix.
Hi @non23
That’s likely because the category refers to a row that doesn’t exist. For example, on November 7, a specific category might not have an entry in your data. So while the rolling average returns a value, there’s no corresponding value for the conversion factor.
A more reliable approach would be to use dimension tables—one for dates and one for categories. The date dimension should contain all dates without gaps. Then, base your calculations on those dimension tables using the relevant columns. Examples:
Rolling Avg Sales =
CALCULATE (
AVERAGEX ( VALUES ( Dates[Date] ), [Sum of Sales] ),
DATESINPERIOD ( Dates[Date], MAX ( Dates[Date] ), -2, DAY ),
REMOVEFILTERS ( Dates ) --- not necessary if Dates have been marked as date table.
)
Rolling Avg Sales Converted =
SUMX (
SUMMARIZECOLUMNS (
Dates[Date],
ConversionFactor[Category],
"@converted", [Rolling Avg Sales] * CALCULATE ( SUM ( ConversionFactor[ConversionFactor] ) )
),
[@converted]
)
You can see in the sc reenshot below that as long as rolling average has a value, so does the converted.
Please see the attached pbix.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 36 | |
| 33 | |
| 31 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |