How can I count distinct values in a table and how can I convert Queries results from tables into pivot/tables in batch?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

How can I count the distinct values in a field in a table?

The table has been loaded as a SQL query.

If it is not possible to do that, how can I change all the queries (20 of them) into pivot/tables instead of having them as tables as I do now? Is there a way to change all of them with one click or I have to click each by each?

Thanks!
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
I would investigate Powerquery, but without more detail it is impossible to suggest (I don't know SQL).

HTH a bit
 
Upvote 0
Sorry but what do you mean exactly 'more detail'?
What more detail do you need? It would be very helpful if you let me know so that I try to provide that more detail.
I cannot guess what more detail you need. From my side, the question has all the detail needed, there isn't any more detail that I withheld.
 
Upvote 0
(Power Query) append/merge these 20 queries/tables into one then create Pivot from that

But they are different queries, they do not result to data that can be appended/grouped into one. I need to have them as separate results in separate sheets.
 
Upvote 0
you've been asked about more details
but without more detail it is impossible to suggest
these are the details
But they are different queries, they do not result to data that can be appended/grouped into one. I need to have them as separate results in separate sheets.
so try create Pivot for each query directly
no pain no gain
 
Upvote 0

Forum statistics

Threads
1,215,036
Messages
6,122,794
Members
449,095
Latest member
m_smith_solihull

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top