Forum Discussion
Counting values across multiple rows based on primary column
That looks like the right output that would let me run the same date filter on the calculated table as the original. Can you explain how you got to that point from the original table, please?
select date column and unpivot other columns in pq,then you will get the new layout
- PS233 years agoRegular Visitor
My primary table has about 800 rows (anticipating it has 1500 by year's end), and about 60 columns. If use only the needed data in a new table, I still wind up with 32 columns before the unpivot. The current solution for using distinct values from a union of the country-equivalent-columns, then using the countrows function (if I'm remembering that right) gets me 80% of the way there, but then I wind up with a visual slicer for time that works on the primary table but not the second table (something about lost lineage according to the guides I'm reading).
I'm hoping there's a simple few lines of instructions I can include in the number-of-times-column in the second table, so that it can first filter the primary table based on a creation date, and then countrows. But that might be best asked in a new question since it's off the topic from the original posted here....