Forum Discussion
Creating relationship between measures and a table
- 1 year ago
Hi hidenseek9,
The issue occurs because SELECTCOLUMNS() is causing duplicate entries, instead use SUMMARIZE() so that each category appears only once per year and removes duplicates.
Replace the measure with below one:
FCF_Forecast_Table =
VAR FCF_2024 = SUMMARIZE('FCF', 'FCF'[Category], "Year", "2024 Actual", "Value", [FCF_2024])VAR FCF_Target = SUMMARIZE('FCF', 'FCF'[Category], "Year", "2025 Target", "Value", [FCF_2025_Target])
VAR FCF_Forecast = SUMMARIZE('FCF', 'FCF'[Category], "Year", "2025 Forecast", "Value", [FCF_2025_Forecast])
RETURN UNION(FCF_2024, FCF_Target, FCF_Forecast)
This should now correctly display only one row per category per year, removing duplicates and you can use this structured table in a Matrix or Waterfall Chart without any repetition issues.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly, don't forget to give a "Kudos" – I’d truly appreciate it!
Thanks and regards,
Anjan Kumar Chippa
Hi hidenseek9 - Since measures don’t inherently belong to rows, the best approach is to unpivot your forecast data into a table format that matches the existing category structure.
FCF_Forecast_Table =
VAR FCF_2024 =
SELECTCOLUMNS(
{'FCF'}, "Macro Category", "FCF", "Year", "2024", "Value", [FCF_2024]
)
VAR FCF_Target =
SELECTCOLUMNS(
{'FCF'}, "Macro Category", "FCF", "Year", "2025 Target", "Value", [FCF_2025_Target]
)
VAR FCF_Forecast =
SELECTCOLUMNS(
{'FCF'}, "Macro Category", "FCF", "Year", "2025 Forecast", "Value", [FCF_2025_Forecast]
)
RETURN UNION(FCF_2024, FCF_Target, FCF_Forecast)
Waterfall charts require a category-based column, not individual measures. Since your FCF forecast is stored in measures, you need to structure the data properly.
Ensure the FCF_Forecast_Table (from Step 1) is structured properly.
Create a waterfall chart in Power BI:
Category: "Macro Category"
Breakdown: "Year" (to show 2024 vs. 2025 vs. Forecast)
Values: "Value"
Adjust formatting so that the starting point is FCF 2024, and increments show changes leading to FCF 2025 Target/Forecast.
hope this helps.
Thank you pankajnamekar25 rajendraongole1
By using SELECTCOLUMNS on both 2025 target and 2024 actual, I was able to stack a table such as below.
From here, I would need to attach the forecast value in the same format after 2024 actual. However, by using SELECTCOLUMNS it returns 22 of the same data such as below.
How can I return a clean table with
1 line for each item?