Forum Discussion
Create a group with years
- 1 year ago
Creating a Group in Power BI
Select Your Column:
In the Data view, select the column that contains the values you want to group (e.g., a column with years).
Create a Group:
Right-click on the column header and select New Group.
Define the Group:
In the Groups dialog box, you can manually add the values you want to group together. For example, you can create a group for “2024” and “2023”.
Click on New Group and name it (e.g., “Year Group”).
Add the values “2024” and “2023” to this group.
Apply the Group:
Once you have defined your groups, click OK. The new group will be created and added to your Fields pane.
Use the Group in Visuals:
You can now use this group in your visuals. Drag the new group field to your visual to see the grouped data.
Example
Here’s a step-by-step example:Select the Year Column:
Suppose you have a column named Year with values like “2024”, “2023”, etc.
Create a Group:
Right-click on the Year column header and select New Group.
Define the Group:
In the Groups dialog box, create a new group named “Recent Years”.
Add “2024” and “2023” to this group.
Apply the Group:
Click OK to create the group.
Use the Group in a Visual:
Drag the new “Recent Years” group to a visual to see the grouped data.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!
Creating a Group in Power BI
Select Your Column:
In the Data view, select the column that contains the values you want to group (e.g., a column with years).
Create a Group:
Right-click on the column header and select New Group.
Define the Group:
In the Groups dialog box, you can manually add the values you want to group together. For example, you can create a group for “2024” and “2023”.
Click on New Group and name it (e.g., “Year Group”).
Add the values “2024” and “2023” to this group.
Apply the Group:
Once you have defined your groups, click OK. The new group will be created and added to your Fields pane.
Use the Group in Visuals:
You can now use this group in your visuals. Drag the new group field to your visual to see the grouped data.
Example
Here’s a step-by-step example:
Select the Year Column:
Suppose you have a column named Year with values like “2024”, “2023”, etc.
Create a Group:
Right-click on the Year column header and select New Group.
Define the Group:
In the Groups dialog box, create a new group named “Recent Years”.
Add “2024” and “2023” to this group.
Apply the Group:
Click OK to create the group.
Use the Group in a Visual:
Drag the new “Recent Years” group to a visual to see the grouped data.
Best Regards
Saud Ansari
If this post helps, please Accept it as a Solution to help other members find it. I appreciate your Kudos!