Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowJuly 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more
Hi, i'm new in PowerBI and DAX.
In my dataset I have combinations of the following fields:
Country, City, Sales
I have a false city called 'Market'. I would like to calculate the market amount of sales by line.
I wish to obtain
Country, City, Sales, Sales Market
Where "Sales Market" is correspond the sales for the market in the city
IN SQL the result could be something like:
SELECT t1.country, t1.city, t1.sales, sum(t2.sales as salesMarket)
FROM table t1
INNER JOIN table t2
ON t1.country = t2.country
AND t2.city = 'Market'
Thks for your help
@Anonymous you can add new measure with following expression
Market Sales = CALCULATE( SUM( Table[Coloumn] ), Table[City] = "Market" )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
It is not a solution. If a apply this I'll get the sum of all Market lines. I want to get the Market for the same country.
Example:
France Market 10000
France Paris 5000
Germany Market 20000
Germany Berlin 5000
I want this result:
France Market 10000 10000
France Paris 5000 10000
Germany Market 20000 20000
Germany Berlin 5000 20000
thks for your time anyway
@Anonymous I assumed you have relationship between you tables and it would work. Seems like you just showed one table in your original post. It help if you provide sample data and how your data model is. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I have only one table
@Anonymous share sample data in excel.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.
Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 18 | |
| 16 | |
| 13 |
| User | Count |
|---|---|
| 63 | |
| 42 | |
| 40 | |
| 40 | |
| 38 |