Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Hi,
Am reading data from postgres to powerbi with direct query mode. count(distinct) is not working am pasting the error below.when i change it to import mode then its working.
@Anonymous , You just used a table not SQL in the advance option of connection?
Also try measure like
new measure = Countrows(Summarize(Table, Table[Column]) )
Yes am just using table and then in the visual,
per a day per a vendor i need distinct count of stores so am doing like below.
in the values i have given column and then am selecting count(distinct) like below
@Anonymous , If it is dax function then
new measure = distinctcount(Table[Column])
or
new measure = Countrows(Summarize(Table, Table[Column]) )
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 23 | |
| 23 | |
| 21 | |
| 17 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 51 | |
| 39 | |
| 29 | |
| 24 |