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 there ,
I have a data as below ;
When i create a chart on power bi , datas are showed together based on months as below
But i want to show datas as below based on their names groupped first then based on month , could you pls telll me how can i manage below seem on power bi ... thanks in advance
Solved! Go to Solution.
I was hoping Field Parameters could be used to quickly solve this but the result wasn't quite what you requested. Instead I put your Categories into a table and added a measure to extract the values from your table.
1. Category table (DAX), Seq should be used as sorting column:
Categories = DATATABLE(
"Category", STRING,
"Seq", INTEGER,
{
{"Total Sales", 1},
{"Branch 1 Sales", 2},
{"Branch 2 Sales", 3},
{"Total Order Qty", 4},
{"Total Delivery", 5},
{"File Qty", 6}
}
)
2. Measure (DAX):
Measure = SWITCH(SELECTEDVALUE(Categories[Category]),
"Total Sales", SUM('Table'[Total Sales]),
"Branch 1 Sales", SUM('Table'[Branch 1 Sales]),
"Branch 2 Sales", SUM('Table'[Branch 2 Sales]),
"Total Order Qty", SUM('Table'[Total Order Qty]),
"Total Delivery", SUM('Table'[Total Delivery]),
"File Qty", SUM('Table'[File Qty])
)
3. Use Clustered Column Chart visual with 'Categories'[Category] as x-axis, 'Categories'[Measure] as y-axis and 'Table'[Month] as legend.
I was hoping Field Parameters could be used to quickly solve this but the result wasn't quite what you requested. Instead I put your Categories into a table and added a measure to extract the values from your table.
1. Category table (DAX), Seq should be used as sorting column:
Categories = DATATABLE(
"Category", STRING,
"Seq", INTEGER,
{
{"Total Sales", 1},
{"Branch 1 Sales", 2},
{"Branch 2 Sales", 3},
{"Total Order Qty", 4},
{"Total Delivery", 5},
{"File Qty", 6}
}
)
2. Measure (DAX):
Measure = SWITCH(SELECTEDVALUE(Categories[Category]),
"Total Sales", SUM('Table'[Total Sales]),
"Branch 1 Sales", SUM('Table'[Branch 1 Sales]),
"Branch 2 Sales", SUM('Table'[Branch 2 Sales]),
"Total Order Qty", SUM('Table'[Total Order Qty]),
"Total Delivery", SUM('Table'[Total Delivery]),
"File Qty", SUM('Table'[File Qty])
)
3. Use Clustered Column Chart visual with 'Categories'[Category] as x-axis, 'Categories'[Measure] as y-axis and 'Table'[Month] as legend.
In Power Query, if you select the first column (Date?) and choose Unpivot other columns, you will get 3 columns that can be pulled on to a column chart to get what you want
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 |
---|---|
60 | |
58 | |
54 | |
36 | |
33 |
User | Count |
---|---|
79 | |
66 | |
45 | |
45 | |
43 |