Forum Discussion
Help needed - filter, power queries and pivot
- Jun 04, 2023
Linking posts is appreciated, marking solutions helps people who Search - Thanks
See attached file that does what you expect in term of Count by Activity Status
Hi smsayedee
Not sure I fully understand how you want to represent your filter. See if Sheet2 (done with Power Query) allows doing what you expect, otherwise please clarify
- smsayedeeMay 31, 2023Copper ContributorThank you so much for this, however, if some of the startDate cells and/or endDate cells are empty, then could you please advise how to write the GetPeriods function so that it doesn't return an error ('can't convert null value to date')? many thanks in advance 🙂
- LorenzoMay 31, 2023Silver Contributor
There's probably something to do. However, what "MMMM yyyy" - or any other value i.e. null - should be returned in such a case?
- smsayedeeJun 01, 2023Copper Contributor
Lorenzo thanks for helping me out. I've attached a mockup spreadsheet so that I probably be able to explain my problem better. In the spreadsheet, the Sheet1 contains the raw data with sheet 'Table1' is the output of query. Now you would notice that there may be some blank rows in Table1, especially some may have start date but not the end date, some may not have both and others may be completely blank rows. I want these incomplete rows not to be included in the output of the query.
Therefore, incorporating your previous solution to get the period for each activity I want to create a pivot slicer with list of months that allows me to filter the activities that are occurring that month.
Again, thank you so much for your help with this. 🙂