Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Summarize quantities across 3 fact tables

Hi All

I am looking to summarize some quantities across 3 regions, which all have similarly structured fact_tables.
IT is giving me a hard time getting access to the dimension tables, but I can create unique lists and append a new query to create a pseudo dimension table.

each table has 4+ million rows, so appending all of it might take a while.

Now in above example, lets say I have a list of affiliates related to each fact table,
how would I create a single measure of quantities to place in a visual with the affiliate dimension

Kind regards
Daniel

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Found the solution

 

solution.png

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Just to itterate.
Each fact_table has no common ID in the sense that only a specific subset of affiliates are in each specific fact_table.
For products, they are recuring and i could merge the query.

But for other elements thar are region specific I would need to append?

I tried doing the following 

troubleshooting.png

 

But the sum of quantities are not adding up to the same number when simply chosing 
NA and the fact_table quantity

Anonymous
Not applicable

Found the solution

 

solution.png

Greg_Deckler
Super User
Super User

@Anonymous - After merging into a single fact table you could right-click the query, choose reference, remove all unneeded columns and then right click your affiliate column and choose remove duplicates to get them to be unique.

 

If you are talking about summing across three different fact tables, you could use the technique MC Aggregations here:

https://community.powerbi.com/t5/Quick-Measures-Gallery/Multi-Column-Aggregations-MC-Aggregations/m-p/391698#M129

 

Not very clear. Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

You can try Summarize or SummarizeColumns function to summarize data and while grouping a data use a required filter before expression in EX. Var Table A=Summarize(Filter(),Expression)

Var Table B=Summarize(Filter(),Expression)
RETURN
UNION(A,B)

 

amitchandak
Super User
Super User

@Anonymous , I think instead of merge if you can join with a common dimension and create a measure, to sum up, that can also work.

 

For merge, you using power query merge

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

 

If so, also refer:https://www.thebiccountant.com/2019/10/28/performance-tip-for-aggregations-after-joins-in-power-query-and-power-bi/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.