Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Everyone,
I an new on working on Power BI and I seek you help on urgent assignment.
I have a project in Power BI, to visual Activity based on Time. There are certian Acitivties are not generated from the system which I must also inculde.
the question is: I have an activities called "Customer Services" and the time give per day is 2 hours. since such activities will not occur in exact time during the day I would like to divide the 2 / 8 "Working Hours" so when I visualize it it show from 9 am to 5 pm.
The current Table I have as the following Columns:
Date
Activity
Solved! Go to Solution.
Hi @AliRashed2024 ,
I have assumed some data, 'Table' surface system-generated data and 'Table2' represents activities that do not exist in the system.
Please follow these steps:
1.Appending Two Tables Together Using Power Query
2.Use the following DAX expression to create a table named 'Time'
Time = ADDCOLUMNS(GENERATESERIES(TIME(9,0,0),TIME(17,0,0),TIME(1,0,0)),"Column",HOUR([Value])*100+MINUTE([Value])*10+MINUTE([Value]))
2.Use the following DAX expression to create columns in 'Table'
Column1 = IF(ISBLANK([StartTime]),900,HOUR([StartTime]) *100 + MINUTE([StartTime])*10 + SECOND([StartTime]))
Column2 = IF(ISBLANK([EndTime]),1700,HOUR([EndTime]) *100 + MINUTE([EndTime])*10 + SECOND([EndTime]))
3.Use the following DAX expression to create a measure
Measure =
VAR _a = SELECTEDVALUE('Time'[Column])
VAR _b = CONCATENATEX(FILTER('Table','Table'[StartTime] <= _a && 'Table'[Column2] >= _a ) ,'Table'[Activity]," "&",")
RETURN _b
4.Final output
Hi @AliRashed2024 ,
I have assumed some data, 'Table' surface system-generated data and 'Table2' represents activities that do not exist in the system.
Please follow these steps:
1.Appending Two Tables Together Using Power Query
2.Use the following DAX expression to create a table named 'Time'
Time = ADDCOLUMNS(GENERATESERIES(TIME(9,0,0),TIME(17,0,0),TIME(1,0,0)),"Column",HOUR([Value])*100+MINUTE([Value])*10+MINUTE([Value]))
2.Use the following DAX expression to create columns in 'Table'
Column1 = IF(ISBLANK([StartTime]),900,HOUR([StartTime]) *100 + MINUTE([StartTime])*10 + SECOND([StartTime]))
Column2 = IF(ISBLANK([EndTime]),1700,HOUR([EndTime]) *100 + MINUTE([EndTime])*10 + SECOND([EndTime]))
3.Use the following DAX expression to create a measure
Measure =
VAR _a = SELECTEDVALUE('Time'[Column])
VAR _b = CONCATENATEX(FILTER('Table','Table'[StartTime] <= _a && 'Table'[Column2] >= _a ) ,'Table'[Activity]," "&",")
RETURN _b
4.Final output
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
23 | |
9 | |
7 | |
6 | |
6 |
User | Count |
---|---|
28 | |
11 | |
11 | |
10 | |
6 |