Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Folks:
I am building an Exercise & Nutrition solution in power bi desktop. (I am getting data from myfitnesspal.com) The data comes in csv form. The csvs have been pulled into the solution and are in my data model. I also have a date dimension table where each date is a single row.
There are csvs (thus tables in my data model) for nutrition and exercise. These are 1:m with the date table. (You can exercise more then once per day - and you can eat more then once per day.) The relationships have been set up in the model.
My goal now is to build a calculated table that is a summary of calories. What I have is:
Calories =
NATURALINNERJOIN
(
SUMMARIZE
(
'Nutrition-Summary',
'Nutrition-Summary'[Date],
"FoodCalories",SUM('Nutrition-Summary'[Calories]),
"FoodCarbs",SUM('Nutrition-Summary'[Carbohydrates (g)])
),
SUMMARIZE
(
'Exercise-Summary',
'Exercise-Summary'[Date],
"ExerciseCalories",SUM('Exercise-Summary'[Calories])
)
)
Each of those SUMMARIZE statements work if executed alone. But when I go to join them together (as you would two CTEs in SQL) I get "No common jopin columns detected. The join function NATURALINNERJOIN requires at-least one common join column." I want these to join on date. How do I make that happen?
Hi jflanner,
Please check if the data type of [Date] columns in table 'Nutrition-Summary' and table 'Exercise-Summary' are same.
Regards,
Jimmy Tao
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
99 | |
82 | |
70 | |
60 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |