Forum Discussion
Referencing a range within a pivot table field(s)
- Feb 03, 2024
allodiba Looking at your screenshots, it seems like you could just move the Answers field into the Columns Area of the pivot table report.
Having said that, the entire report could simply be built with the COUNTIFS function, rather than having to mess around with Power Query, Power Pivot and/or pivot tables.
Please see the attached file, which is setup as an "all-in-one" report, where you can generate results by Marital Status, Retirement Timeline or Age, or any combination of the three. You can also use Filters on the results range to sort by % Yes or % No/Sort of, as well as to filter by Number Filters > Top 10...
EDIT: in the attached file I've also included a second worksheet called "Report with Blanks", which has been modified to accommodate any records in the data table containing blank values (ie: if the Age field is left blank, or if an answer to any question is left blank). If this is not a concern, the "Report" worksheet will be sufficient. Cheers!
allodiba Looking at your screenshots, it seems like you could just move the Answers field into the Columns Area of the pivot table report.
Having said that, the entire report could simply be built with the COUNTIFS function, rather than having to mess around with Power Query, Power Pivot and/or pivot tables.
Please see the attached file, which is setup as an "all-in-one" report, where you can generate results by Marital Status, Retirement Timeline or Age, or any combination of the three. You can also use Filters on the results range to sort by % Yes or % No/Sort of, as well as to filter by Number Filters > Top 10...
EDIT: in the attached file I've also included a second worksheet called "Report with Blanks", which has been modified to accommodate any records in the data table containing blank values (ie: if the Age field is left blank, or if an answer to any question is left blank). If this is not a concern, the "Report" worksheet will be sufficient. Cheers!
- allodibaFeb 13, 2024Copper ContributorHi there,
Ended up just using COUNTIFS
Example:
=COUNTIFS(Table1[Score],"<91",Table1[Score],">46", Table1[Retirement Timeline], "Retiring 3-5 Years")
Thanks for your assistance!