The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
HELLO,
PLease i'm still fresh in power bi,
i have this table below:
and i want to calculate:
How many tickets number have been resolved in less to 4hours?
the percentage of ticket resolved in less to 4hours?
Solved! Go to Solution.
@ayoubb
Create a column in your table to calculate the duration in hours ( Go to Modeling Tabl, click New Column, and paste). Replace Table14 with your table name.
Resolved Duration = DATEDIFF(Table14[Created Date],Table14[Resolved Date],HOUR)
Create the following 2 measures:
Resolved Less Than 4 Hours =
CALCULATE(
COUNTROWS( Table14 ) ,
Table14[Resolved Duration] < 4
)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
Hi @ayoubb ,
In addition, you can put this measure in a card visual to get the percentage.
Percentage =
DIVIDE ( [Resolved Less Than 4 Hours], COUNTROWS ( Table ) )
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ayoubb
Create a column in your table to calculate the duration in hours ( Go to Modeling Tabl, click New Column, and paste). Replace Table14 with your table name.
Resolved Duration = DATEDIFF(Table14[Created Date],Table14[Resolved Date],HOUR)
Create the following 2 measures:
Resolved Less Than 4 Hours =
CALCULATE(
COUNTROWS( Table14 ) ,
Table14[Resolved Duration] < 4
)
________________________
If my answer was helpful, please click Accept it as the solution to help other members find it useful
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group