How can I condense multiple rows into a single cell in a Matrix or a Table?
Obviously, it is easy to display all details like you see below:
But what if for every product I just want to know what countries it is selling in and what channels are used? Like how it is displayed below:
Turns out we have to write a bit of DAX but thankfully, not much at all.
Click here to download the PBIX model.
You can get the detailed explanation from my video but here are the DAX calculations that I had to create to enable this use-case.
Product Channels = IF( HASONEVALUE('Product'[Product]), CONCATENATEX ( Channel, "• " & Channel[Channel], UNICHAR(10)&UNICHAR(13) , Channel[Channel] ) )
Product Countries = IF( HASONEVALUE('Product'[Product]), CONCATENATEX ( Country, "• " & Country[Country], UNICHAR(10)&UNICHAR(13) , Country[Country] ) )