Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hello there,
Before I come here and ask this question. I asked chatgpt 3.5 to answer my question and I didn't like its answer.
Suppose we have a basic sql query here below:
SELECT
bt.file_hash,
bt.project_code,
(y.cat1_cost - bt.cat1_cost ) / bt.cat1_cost AS variance_cat1_cost
FROM
bluetable as bt
INNER JOIN yellowtable as y
ON bt.file_hash = y.file_hash and bt.cat10 = y.cat10
GROUP BY
bt.file_hash,
bt.project_code
and I get this answer below:
EVALUATE
SUMMARIZECOLUMNS (
bt[file_hash],
bt[project_code],
"variance_cat1_cost",
DIVIDE ( (SUM ( y[cat1_cost] ) - SUM ( bt[cat1_cost] )), SUM ( bt[cat1_cost] ))
)
and it says you don't have to specificy join condition because power bi it's based on common columns.
I doesn't make any sense, this is my join and that's how I get unique records.
Can someone explain me or guide me how I can create a calculated table with dax with aggregation included?
any video, link or code please.
Thanks!
Solved! Go to Solution.
@jgeddes Sorry for late response, I went with sql query so that I couldn load any way that I wanted.
However, we could do distinct column (mutual) to create a table and adding other columns with RELATED function to find corresponding value on the second table, so that I could use this as completing the third table.
These two article are helpful to get the columns you like and join them together, but in my case I needed to do something different.
Edit: I found this article, I believe if I digged into this I could've found my solution on your approach as well.
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
Thanks again!
@jgeddes Sorry for late response, I went with sql query so that I couldn load any way that I wanted.
However, we could do distinct column (mutual) to create a table and adding other columns with RELATED function to find corresponding value on the second table, so that I could use this as completing the third table.
These two article are helpful to get the columns you like and join them together, but in my case I needed to do something different.
Edit: I found this article, I believe if I digged into this I could've found my solution on your approach as well.
https://www.sqlbi.com/articles/from-sql-to-dax-joining-tables/
Thanks again!
The answer you got would rely on a relationship being in place between the two tables.
Here is a link to an article that explains join functions in DAX.
https://www.sqlbi.com/articles/using-join-functions-in-dax/
and a link to the NATURALINNERJOIN DAX function
https://learn.microsoft.com/en-us/dax/naturalinnerjoin-function-dax
Hope this gets you pointed in the right direction.
Proud to be a Super User! | |
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |