March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
I am trying to build a summary table displaying countries in one column and some numbers (Members,Joins,Expires) for those countries in other columns.
That is my desired (simplified) result:
Country Members Joins Expires
Canada 50 20 15
USA 80 30 25
UK 40 25 10
The way I have it set up now is having 3 seperate queries/tables (Members,Joins,Expires) each query feeds one report.
In other words, my members report has a table displaying Country and Members columns,
my Joins report has a table displaying Country and Joins columns,
and same for Expires, a table displaying Country and Expires columns.
Current State:
Country Members
Canada 50
USA 80
UK 40
Country Joins
Canada 20
USA 30
UK 25
Country Expires
Canada 15
USA 25
UK 10
The way these three tables are created is using a distinct member ID per country.
Any thoughts?
Solved! Go to Solution.
Sorry for the late reply. Did you get this one sorted?
I'm guessing there is a subtle difference in the spelling, or even a rogue space that needs to be cleaned for an exact match
I am not sure what's easier to explain so that I can accomplish this whether dax or merging queries.....
I am not sure if merging queries solves the problem. Can you give me an example of how to merge let's say two tables/queries?
In both tables there are countries that may not be in another table.
Country Members
Canada 50
USA 80
UK 40
Brazil 20
Country Joins
Canada 20
USA 30
UK 25
Australia 10
My desired output is to combine all countries in both columns:
Country Members Joins
Canada 50 20
USA 80 30
UK 40 25
Brazil 20 0
Australia 0 10
Member IDs per country is the formula (2 columns)
Hope it makes sense.
HI @lukaspowerbi,
In the Query Editor, I created the following two tables.
Table1
and Table2
I then chose the Merge Queries as New option
I then configure the Merge dialog as follows. Be sure to click the Country column in bot tables.
In the newly created table, click the "expand columns" button in the top right hand corner
Configure the dialog as follows and click ok
Now add a new column to combine the two contry fields as follows
Delete the 1st and 3rd columns ("Country" and "Table2.Country"), and rename the 5th column from "Custom" to "Country".
Highlight the 1st and 2nd columns and use the Replace Values function on the Home table to convert nulls to zeros.
Then rename, and reorder your columns and you are good to go.
Hi @Phil_Seamark.
You have been a great help. Thank you!!!
I have one more thing that I would like to ask you about if there is a way to do some work around.
I added a custom column and replaced null values from the first Country column by values in the 5th column.
However, there is Papua New Guinea that causes a bit issue. I attached a screenshot where I highlighted the issue in the pic below.
Sorry for the late reply. Did you get this one sorted?
I'm guessing there is a subtle difference in the spelling, or even a rogue space that needs to be cleaned for an exact match
Have you considered merging the tables using then Query Editor?
This will allow you to create a new table that looks like your desired output.
Otherwise we can do this in DAX if you prefer
Thank you.
I think I'll ttry to use the merge queries function and see how it goes.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |