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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
Topjacket
Helper I
Helper I

Summarize 2 Columns with all possible options

Hi

 

I have added a new table using SUMMARIZE. All seemed to be working fine but I have just realised that some "Customers" do not have all dates which I need to display. 

 

Is it is possible to create a table from 2 columns but displaying all possible combinations?

 

Main Table = Summarize(Cases,Cases[Customer],Cases[CreatedMonthAndYear])
 
Data Example
CustomerCreatedMonthAndYear
AAFeb 2024
BBMar 2024
CCApr 2024
 
 
Desired Output Example
CustomerCreatedMonthAndYear
AAFeb 2024
AAMar 2024
AAApr 2024
BBFeb 2024
BBMar 2024
BBApr 2024
CCFeb 2024
CCMar 2024
CCApr 2024
 

Any Help would be great

 

Thanks

1 ACCEPTED SOLUTION
shafiz_p
Resident Rockstar
Resident Rockstar

Hi @Topjacket  Using crossjoin, you would be able to create all kinds of possible combination. Try below code:

DesiredTable = 
CROSSJOIN(
    DISTINCT('Cases'[Customer Created]),
    DISTINCT('Cases'[MonthAndYear])
)

Desired output:

shafiz_p_0-1728987419404.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

 

Best Regards,
Shahariar Hafiz

View solution in original post

2 REPLIES 2
shafiz_p
Resident Rockstar
Resident Rockstar

Hi @Topjacket  Using crossjoin, you would be able to create all kinds of possible combination. Try below code:

DesiredTable = 
CROSSJOIN(
    DISTINCT('Cases'[Customer Created]),
    DISTINCT('Cases'[MonthAndYear])
)

Desired output:

shafiz_p_0-1728987419404.png

 

 

Hope this helps!!

If this solved your problem, please accept it as a solution!!

 

 

Best Regards,
Shahariar Hafiz

shafiz_p
Well this is just delightful! Thank you very much for your help. I was reading up elsewhere and it was looking like it wasn't going to be straightforward so its great to see a very simple solution.
Thanks again
 
 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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