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
mpaler
Frequent Visitor

summarize columns using related dimension table

It seems that summarizecolumns doesn't respect relationships between a fact table and a date dimension table? Is this true?

 

For example:

 

If I do the following in DAX:

 

 

New Table = SUMMARIZECOLUMNS(
'Shipment Line'[CreatedDate],
'Date'[YearQuarter],
FILTER('Product','Product'[Product Group.Name] = "Solar Panels")
)

 

I would expect the resultant table to to show the appropriate "YearQuarter" relative to the "CreatedDate" (Fact table), however, it doesn't "join" as expected. The result looks like:

 

Screen Shot 2017-06-21 at 4.33.40 PM.png

 

However, in diagramming view, the relationship is respected:

 

Screen Shot 2017-06-21 at 4.35.48 PM.png

 

Any ideas here? 

 

I should point out that it appears relationships between other fact tables seems to hold using summarizecolumns. It's just the dax date dimension table that fails.

1 ACCEPTED SOLUTION
v-yuezhe-msft
Employee
Employee

@mpaler,

In your DAX, you don’t include any expression in the SUMMARIZECOLUMNS function, thus you obtain a crossjoin of Shipment Line table and Date table as a result, and the formula you use will produces all the possible combinations between CreatedDate and YearQuarter.

Create a new table by adding expression in the SUMMARIZECOLUMNS function, there is an example for your reference.

New Table = SUMMARIZECOLUMNS(
'Calendar'[Year],	
 Sales[DateKey],
 FILTER('Product','Product'[BrandName]="Contoso"),"total sales",SUM(Sales[SalesAmount]
))

Please review the following blogs about how to use SUMMARIZECOLUMNS function.

https://www.sqlbi.com/articles/introducing-summarizecolumns/
http://umashanthan.blogspot.sg/2017/04/how-to-use-summarizecolumns-function.html


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-yuezhe-msft
Employee
Employee

@mpaler,

In your DAX, you don’t include any expression in the SUMMARIZECOLUMNS function, thus you obtain a crossjoin of Shipment Line table and Date table as a result, and the formula you use will produces all the possible combinations between CreatedDate and YearQuarter.

Create a new table by adding expression in the SUMMARIZECOLUMNS function, there is an example for your reference.

New Table = SUMMARIZECOLUMNS(
'Calendar'[Year],	
 Sales[DateKey],
 FILTER('Product','Product'[BrandName]="Contoso"),"total sales",SUM(Sales[SalesAmount]
))

Please review the following blogs about how to use SUMMARIZECOLUMNS function.

https://www.sqlbi.com/articles/introducing-summarizecolumns/
http://umashanthan.blogspot.sg/2017/04/how-to-use-summarizecolumns-function.html


Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.