March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi all
I have a table that has the months Jan to Dec as fields containing a number. I would like to sum those month fields into a new table. The new table would have 2 fields...
Month | No of Days
Jan 500
Feb 560
Mar 454
etc etc.
Thanks
Keith
Solved! Go to Solution.
Hi @roasty1980 ,
Follow steps in order in Query Editor:
Sample data considered:
Then select all the 3 columns as unpivit them:
You will end up with following:
Now select your ATTRIBUTE column and then GROUP BY:
A window appears, then provide following information:
You end up with the required output:
Hope this helps.
Thanks,
Pragati
Hi @roasty1980 ,
You can try using following DAX to create a table with just 2 columns selected:
@roasty1980 not sure why you need a summary table but the following will get you the new table:
New Summary Table =
SUMMARIZE ( Table, Table[Month], "No of Days", SUM ( Table[NumberofDays] ) )
but it will be good to know the use case of it, maybe you don't need a summary table.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks for the quick reply @parry2k
I have a table that holds holiday data. I trying to creating a line graph so it shows the Month on the X-axis and the total days booked on the y-axis. Is there a way to do this without creating a new table?
Thanks
Keith
@roasty1980 oh yes for that you don't need a summary table, create measure:
Total Days = SUM ( Table[NumberofDaysCOlumn] )
add a line graph visual, put a month on the x-axis and Total Days measure on values and you will get a result. As a best practice, add date dimension in your model and use it for and time intelligence calculations. Once the date dimension is added, mark it as a date table on table tools.
https://perytus.com/2020/05/22/create-a-basic-date-table-in-your-data-model-for-time-intelligence-ca...
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Sorry @parry2k , I don't think I am explaining myself...
My "Holiday" source table has month fields
Jan | Feb | Mar
10 5 15
10 5 15
10 5 15
I would like to have the data as follows:
Month | No of Days
Jan 30
Feb 15
Mar 45
Thanks
Hi @roasty1980 ,
Follow steps in order in Query Editor:
Sample data considered:
Then select all the 3 columns as unpivit them:
You will end up with following:
Now select your ATTRIBUTE column and then GROUP BY:
A window appears, then provide following information:
You end up with the required output:
Hope this helps.
Thanks,
Pragati
@roasty1980 based on you the layout of your table, what @Pragati11 suggested is the way to go, unpivot your data but you don't need to use groupby step in power query, just unpivot and load the data and use measure in the visuals to group by day. Groupby is adding an extra step and can be very expensive on large datasets and that step can be avoided.
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
129 | |
90 | |
75 | |
58 | |
53 |
User | Count |
---|---|
200 | |
104 | |
101 | |
67 | |
55 |