Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
I need to create a M:M link between two tables with similar structures. (One is historical data. The other is forecast data.) The data is categorized by Market and Submarket, like this:
| Market | Submarket | Region | Sales |
| Retail | Grocery | NA | 247 |
| Retail | Grocery | EU | 656 |
| Retail | Grocery | AP | 723 |
| Retail | Department Stores | NA | 912 |
| Retail | Department Stores | EU | 719 |
| Retail | Department Stores | AP | 206 |
| Retail | Online | NA | 861 |
| Retail | Online | EU | 818 |
| Retail | Online | AP | 919 |
| Financial | Banking | NA | 231 |
| Financial | Banking | EU | 326 |
| Financial | Banking | AP | 299 |
| Financial | Capital Markets | NA | 288 |
| Financial | Capital Markets | EU | 982 |
| Financial | Capital Markets | AP | 287 |
| Financial | Insurance | NA | 243 |
| Financial | Insurance | EU | 805 |
| Financial | Insurance | AP | 534 |
What I want is a table with distinct values of submarket grouped by market, like this:
| Market | Submarket |
| Financial | Banking |
| Financial | Capital Markets |
| Financial | Insurance |
| Retail | Department Stores |
| Retail | Grocery |
| Retail | Online |
I am not trying to summarize any values. I just want the hierarchical data structure. I've tried the SUMMARIZE and CALCULATETABLE functions, but I'm not able to get the result I'm looking for.
Solved! Go to Solution.
@Anonymous
SUMMARIZE works:
Proud to be a Super User!
Paul on Linkedin.
@Anonymous
SUMMARIZE works:
Proud to be a Super User!
Paul on Linkedin.
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@PaulDBrown Wow, that was a lot easier than I was making it. I somehow thougth I needed a summaried field when using the SUMMARIZE function.
Thanks very much for your help!
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 22 | |
| 10 | |
| 8 | |
| 7 | |
| 5 |