Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
Could you please help me on below scenorio.
I have created the DAX function by using SWITCH function.please find the DAX column below.
When i use below calculation in Matrix, its summing up the values as State level and giving it in one column, but i need it in two columns, like Florida and Books combination value as one column and Florida and Chairs combination value as in different column.
Dataset
Formula
Measure1 = SWITCH(TRUE(), Table[State] = "Florida" && Table[Category] = "Books" , Table[Sales]),
Table[State] = "Florida" && Table[Category] = "Chairs" , Table[Sales])
When i use above formula it is giving result like below.
Florida | |
Measure1 | 300 |
But i require something like this.(Column names just for reference)
Florida+Books | Florida+Chairs | |
Measure1 | 100 | 200 |
Kindly help me with this requirement.
Solved! Go to Solution.
Hi @Anonymous
Not sure if I understand your requirement but I think you can create an extra column in your table that concatenates state and category and later use it as Matrix column.
New Column = table[state] & "-" & table[Category]
Hi @Anonymous
Not sure if I understand your requirement but I think you can create an extra column in your table that concatenates state and category and later use it as Matrix column.
New Column = table[state] & "-" & table[Category]
@Anonymous , both case you are returning sales , so no diff. Either you need two columns or Segmentation
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-power-query/
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
68 | |
53 | |
39 | |
33 |
User | Count |
---|---|
70 | |
63 | |
57 | |
49 | |
46 |