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.
How do I add a pbix file to this post ?
So I have two data sources, one "Eaten", the other "Purchased".
Problem 1.... the two tables have common items, and both have unique items, so i want a consolidated table removong duplicates.. so i created a new table using...
SummarizeAllItems = union(SUMMARIZECOLUMNS(Eaten[Item]), SUMMARIZECOLUMNS(Purchased[Item]))
This creates the table below, trouble is with duplicates...... So i created a second table...
Using this
NoDuplicates = SUMMARIZECOLUMNS(SummarizeAllItems[Item])
Added columns of;
Eaten = calculate(sum(Eaten[Eaten]),filter(Eaten,Eaten[Item]=NoDuplicates[Item]))
Purchased = calculate(sum(Purchased[Purchased]),filter(Purchased,Purchased[Item]=NoDuplicates[Item]))
Doesnt seem very elegent, think i'm being to "Excel"..... how do i do this more elegantly....
Problem2........
When i then do a visual, the slicer doesnt work on location....... suspect its because ive done the first bit in a clunky way.... Help....
Solved! Go to Solution.
Hi, in this situation i would use the powerquery end to tidy up the data. Three solutions here either a DAX table like you were trying or Merge or Append in power query:
DAX:
Joiny Table = UNION(SUMMARIZE(Purchased,Purchased[Item],Purchased[Location]),SUMMARIZE(Eaten,Eaten[Item],Eaten[Location]))
There are other solutions in DAX too with CROSSJOIN but in my opinion the above is the most straight foward.
Merge:
Append:
// If this is a solution please mark as such
Hi, in this situation i would use the powerquery end to tidy up the data. Three solutions here either a DAX table like you were trying or Merge or Append in power query:
DAX:
Joiny Table = UNION(SUMMARIZE(Purchased,Purchased[Item],Purchased[Location]),SUMMARIZE(Eaten,Eaten[Item],Eaten[Location]))
There are other solutions in DAX too with CROSSJOIN but in my opinion the above is the most straight foward.
Merge:
Append:
// If this is a solution please mark as such
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |