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.
I have table like this:
DateTime, Cabinet_id, Employee_id
01.01.20 11:00 10 25
01.01.20 11:00 10 12
01.01.20 11:05 10 25
01.01.20 11:05 10 56
01.01.20 11:10 10 null
01.01.20 11:00 12 11
01.01.20 11:05 12 null
01.01.20 11:10 12 12
How can i get bar with result of sql query:
"select hour(DateTime), count(*) from
( select DateTime,Cabinet_id group by DateTime,Cabinet_id)"?
Summarizecolumns and same dax return all the table, but i need to get result after crossfiltering by other elements.
Thank you!
Solved! Go to Solution.
Hi @Alexandergikalo ,
Create the calculated column:
And this measure:
Take out Hour part in a new column
Hour = Hour([DateTime])
Or
Hour = Format([DateTime],"HH")
The plot any visual take cabinate_id on row/group and take the sum of hours and use it
measure =count(Table[Hours])
Or
measure =Countx(Summarize(Table,Table[Cabinet_id],Table[DateTime],Table[Hour]),[Hour])
Hi @Alexandergikalo ,
Try creating a calculated column:
Not that case(
Sql query will return this tesult
01.01.20 11:00 6 recors
Your count - 8
I neet to exlude some kind of doubles.
Hi @Alexandergikalo ,
Create the calculated column:
And this measure:
Thanks) I got a solution.
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 |
|---|---|
| 22 | |
| 21 | |
| 20 | |
| 19 | |
| 13 |
| User | Count |
|---|---|
| 58 | |
| 52 | |
| 37 | |
| 31 | |
| 27 |