Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello
I am creating a table using SUMMARIZECOLUMNS.
My original data looks as follows -
As you can see, there is only 1 category under India.
My table DAX created using SUMMARIZECOLUMNS is as follows -
Solved! Go to Solution.
Hello @Anonymous
SUMMARIZECOLUMNS without a calcualted value performs a CROSSJOIN on the columns and has no way to apply a filter to limit the returned rows (It doesn't know there is no data for India - Technology).
You can use summarize over the detail table then feed in the higher level columns and it will only return values that are represented in the lower level table. Something like
SummarizeTable = CALCULATETABLE ( SUMMARIZE ( OrderBreakdown, ListOfOrders[Country], OrderBreakdown[Category] ), 'ListOfOrders'[Country] = "India" )
This code assumes OrderBreakdown is the bigger detail table and ListOfOrders is joined to it as the 1 side of a *:1
As and example, this code would give me all of the Subcategory values that are represented in the Sales table and leave out any that are not.
Table = SUMMARIZE(Sales,'Product Subcategory'[Subcategory])
Hello @Anonymous
SUMMARIZECOLUMNS without a calcualted value performs a CROSSJOIN on the columns and has no way to apply a filter to limit the returned rows (It doesn't know there is no data for India - Technology).
You can use summarize over the detail table then feed in the higher level columns and it will only return values that are represented in the lower level table. Something like
SummarizeTable = CALCULATETABLE ( SUMMARIZE ( OrderBreakdown, ListOfOrders[Country], OrderBreakdown[Category] ), 'ListOfOrders'[Country] = "India" )
This code assumes OrderBreakdown is the bigger detail table and ListOfOrders is joined to it as the 1 side of a *:1
As and example, this code would give me all of the Subcategory values that are represented in the Sales table and leave out any that are not.
Table = SUMMARIZE(Sales,'Product Subcategory'[Subcategory])
User | Count |
---|---|
132 | |
74 | |
70 | |
58 | |
54 |
User | Count |
---|---|
192 | |
96 | |
67 | |
64 | |
54 |