Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Melbourne
New Member

Dynamic columns to summarize in Power BI

Below is the sample data i have: 

Melbourne_5-1721282645982.png

 

 I have two date parameters which the user will select dynamically. Let say they select 2024-07-01 and 2024-10-30. i would need the values summarized for the months selected July-Oct in this case 

Melbourne_3-1721282598191.png

 

and eventually summarized

Melbourne_4-1721282628808.png

 

 

1 ACCEPTED SOLUTION
Bmejia
Super User
Super User

If your data that your bringing in actually looks like the sample above you will need to first pivot the data.

Go to Transform Data select your table 

 

Then we are going to pivot the data so that the months are all in one column not in different columns. 

(if you actually have a column with a date rather then a month the would be better because you could use the slicer to filter by date otherwise you can only do it by month as your header, but that could cause and issue if you are looking at past years or once you reach the next year) but for our example it would be the same process.

Bmejia_0-1721330915603.png

 

Your data would look now something like this, I would rename Attribute to Month then Close and Apply.

Bmejia_1-1721330970194.png

 

Insert a Matrix table and add your values as shown below.  Then you can just add a month slicer which you can select different months at the same time.  (Again if you have a date rather then a month that would allow you to do what you need above and instead of months you would select the months in between).

Bmejia_2-1721331154212.png

 

View solution in original post

1 REPLY 1
Bmejia
Super User
Super User

If your data that your bringing in actually looks like the sample above you will need to first pivot the data.

Go to Transform Data select your table 

 

Then we are going to pivot the data so that the months are all in one column not in different columns. 

(if you actually have a column with a date rather then a month the would be better because you could use the slicer to filter by date otherwise you can only do it by month as your header, but that could cause and issue if you are looking at past years or once you reach the next year) but for our example it would be the same process.

Bmejia_0-1721330915603.png

 

Your data would look now something like this, I would rename Attribute to Month then Close and Apply.

Bmejia_1-1721330970194.png

 

Insert a Matrix table and add your values as shown below.  Then you can just add a month slicer which you can select different months at the same time.  (Again if you have a date rather then a month that would allow you to do what you need above and instead of months you would select the months in between).

Bmejia_2-1721331154212.png

 

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.