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
Hi Guys,
Thanks all that take the time to answer questions on the community.
Here is my problem I created a virtual table ( 'forecasttable') that contains a forecast for the current month. I want to create a relationship between this table and my calendar. I have tried both join functions but it doesnt find the joining columns.
Here is the working code that returns the total forecasted amount.
VAR forecasttable=
ADDCOLUMNS(
uniondatesandgroups,
"forecast",
IF( [Date] <= lastdate,
[$ Total],
[dailyforecast]
)
)
var forecast =
SUMX( forecasttable, [forecast] )
RETURN
forecast
Solved! Go to Solution.
What you have there is a measure which returns a scalar value. The virtual table is only relevant to the calculation and is not a physical table in the model. So you can't create relationships.
You need to create a new physical table using the code you have for the virtual table in a new table (under "Modeling" in the ribbon).
Proud to be a Super User!
Paul on Linkedin.
What you have there is a measure which returns a scalar value. The virtual table is only relevant to the calculation and is not a physical table in the model. So you can't create relationships.
You need to create a new physical table using the code you have for the virtual table in a new table (under "Modeling" in the ribbon).
Proud to be a Super User!
Paul on Linkedin.
Thanks @PaulDBrown, this is the answer I was looking for. I did create a calculated table but its fixed table, so no slicing and dicing since it only returns totals.
Please see this link and share more details about your question here to be able to work on it.
Appreciate your Kudos!
Can you share a sample PBIX file through OneDrive, Google Drive, Dropbox....?
Proud to be a Super User!
Paul on Linkedin.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 19 | |
| 10 | |
| 9 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 31 | |
| 31 | |
| 20 | |
| 12 | |
| 12 |