Forum Discussion
Combining a COUNTIF, a SUMIF and some operations into a single dynamic formula
- Apr 06, 2022
Eddie505 One option would be with Power Query and requires a "Refresh" when Table1 gets updated. See attached.
A formula-only solution (without helpers etc.) would require a quite complex approach which I haven't thought about yet.
Eddie505 One option would be with Power Query and requires a "Refresh" when Table1 gets updated. See attached.
A formula-only solution (without helpers etc.) would require a quite complex approach which I haven't thought about yet.
Riny_van_Eekelen thanks a lot for this. I've never used power queries before, so this looks like a good opportunity to learn!
- Riny_van_EekelenApr 06, 2022Platinum Contributor
Eddie505 This would be a good point to start.
- Eddie505Apr 20, 2022Copper Contributor
Hi Riny. I loved the tone of the tutorial you recommended, and I totally agree. It really is an amazing tool! I've been able to do everything I wanted to using that tutorial and your example, including filtering results with an input parameter. Really looking forward to using this more in future.
There is one thing I'm struggling with though. The column headers are created as text, not dates. See screenshot below:
If they were formatted as dates, then that would allow any subsequent charts created from this data to recognise when there's an "empty" month, and create a zero value for that month on the chart. As it is now, the Excel chart simply skips that month. E.g.: in my demo sheet, this is what happens if I don't fill in any projects for March.
I suppose getting the date formatting right would be one way to solve this, but then I suppose an alternative solution might be to create a comprehensive list of months, and then merge the data within the Power Query tool with this list? In that way, even if Excel continues to treat the column headers as text, then at least there'd still be a column for every single month, regardless of whether its blank or not. On the down-side, I was really enjoying how the first approach automatically resized the table to fit the max and min dates, and going in this direction would presumably complicate that.
So I just thought to share that with you in case you had any thoughts and/or recommendations!
- Riny_van_EekelenApr 20, 2022Platinum Contributor
Eddie505 Not fully up to speed with your achievements, but am glad you discovered the power of Power Query.
Can say that headers in structured tables are by default texts. So, you can't transform them to dates unfortunately.