Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
I need to count the number of ip_addresses for each username. Group By doesn't seem to work as I cannot select another column when I choose Count Distinct Rows. I've tried a number of DAX measures but they don't work either. Any ideas anyone?? I've pasted my table below removing sensitive data. Many thanks
Solved! Go to Solution.
Thanks but none of these worked. I ended up just connecting to the sheet via Close Load & To in PowerQuery and selecting Only Create Connection and Add This Data to the Data Model and then creating a Pivot Table from the Data Model with a column for usernames and IP addresses as Distinct Values.
Hi @totamum Thanks for reaching out to the Microsoft fabric community forum.
Could you please provide sample data that fully represents the issue or question you're referring to? Kindly ensure the data is in a usable format (e.g., Excel or CSV) rather than a screenshot, and does not contain any sensitive or unrelated information.
Looking forward to your response.
Best regards,
Lakshmi.
Thank you for your reply. I don't have any sample data. I was hoping the structure and column names would be enough.
Hi @totamum
The logic has been implemented using sample data, and the PBIX file is attached for your reference. Kindly review and let me know if you have any questions or require any additional details.
Thanks,
Lakshmi
It's actually for PowerQuery, the source file is an excel file so not PowerBi. Neither of these work unfortunately.
Thanks for the clarification. Since the data is being handled in Power Query (Excel) and not in Power BI, DAX-based solutions would not be applicable here.
Please use the following Power Query approach to achieve the distinct count of IP addresses per username:
Perform a Group By on the username column using the "All Rows" option.
Add a custom column with the following logic:
Table.RowCount(Table.Distinct([All], {"ip_address"}))
This will return the distinct count of IP addresses for each user.
Please let me know if you need any further assistance.
Open Excel
Go to the Data tab in the ribbon
Click on:
Get Data → choose your source (Excel, CSV, etc.)
This will open Power Query Editor
Excel Power query
Thanks,
Lakshmi.
Thanks but none of these worked. I ended up just connecting to the sheet via Close Load & To in PowerQuery and selecting Only Create Connection and Add This Data to the Data Model and then creating a Pivot Table from the Data Model with a column for usernames and IP addresses as Distinct Values.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 |