Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi all,
Let's say I have the below dataset :
| Brand | Value | Competitor |
| Audi | 5000 | No |
| Skoda | 4000 | No |
| VW | 6000 | Yes |
| BMW | 4000 | Yes |
| Peugeot | 3000 | Yes |
| Tesla | 5000 | Yes |
| BYD | 4000 | Yes |
| Citroen | 1000 | Yes |
I want to create a Matrix for which in colomns I want to put all the brands that are not competitor and in rows, all the brands that are competitors.
So it would look as below :
| Audi | Skoda | |
| VW | ||
| BMW | ||
| Peugeot | ||
| Tesla | ||
| BYD | ||
| Citroen |
Anyone knows how I can create a dax to filter my rows and columns?
Thank you
Solved! Go to Solution.
Hi @cris007 ,
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _table=
SUMMARIZE('Table','Table'[Brand],'Table'[Competitor])
var _tableno=
FILTER(_table,[Competitor]="No")
var _tablenotrue=
SUMMARIZE(_tableno,[Brand])
var _tablenotrue1=
ADDCOLUMNS(
_tablenotrue,"Brandgroup",[Brand])
var _tablenotrue2=
SUMMARIZE(
_tablenotrue1,[Brandgroup])
var _tableyes=
FILTER(_table,[Competitor]="Yes")
var _tableyestrue=
SUMMARIZE(_tableyes,[Brand])
return
CROSSJOIN(
_tablenotrue2,_tableyestrue)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @cris007 ,
Here are the steps you can follow:
1. Create calculated table.
Table 2 =
var _table=
SUMMARIZE('Table','Table'[Brand],'Table'[Competitor])
var _tableno=
FILTER(_table,[Competitor]="No")
var _tablenotrue=
SUMMARIZE(_tableno,[Brand])
var _tablenotrue1=
ADDCOLUMNS(
_tablenotrue,"Brandgroup",[Brand])
var _tablenotrue2=
SUMMARIZE(
_tablenotrue1,[Brandgroup])
var _tableyes=
FILTER(_table,[Competitor]="Yes")
var _tableyestrue=
SUMMARIZE(_tableyes,[Brand])
return
CROSSJOIN(
_tablenotrue2,_tableyestrue)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @cris007
To be able to give a proper answer, my first question is: what values would you want to appear in the body of the matrix? Can you give an example?
Regardless, I would suggest that you need a secondary copy of a Brand dimension (possibly with inactive relationship) in order to make this work.
Regards
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 13 | |
| 9 | |
| 8 | |
| 8 | |
| 7 |