Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Graph that shows me how many items was delivered under 20 min, 60 min, 5 hours and 24 hours.

I already have all the infos, i just dont know know to make this graph. 
My itens are separated by id and have the time spent on each item. 

Plz ignore all the items that isnt the "id number" and "Tempo Horas" 

 

Now i just need somehow filter my data to plot in whatever graph that looks better the infos that i need.

Needs to be:
< 20
>20<60
>60<5h
>5h<24h 

Can be a tree graph, pizza graph, bars graph, actually doesnt matter.

 

Vieiraguilherme_0-1603211215875.png

 

2 REPLIES 2
v-yangliu-msft
Community Support
Community Support

HelloVieiraguilherme ,

Here are the steps you can follow:

1. Create a column.

Second = DATEDIFF('Table'[Change On  Timestamp_PrevRow],'Table'[Change On Timestamp],SECOND)
compara =
var _minute='Table'[Second]/60
var _compare=
SWITCH(
    TRUE(),
    _minute <20,"<20 min",
    _minute <60,"> 20 min and < 60 min",
    _minute <300,"> 60min and < 5 h",
    _minute < 24 * 60,"> 5h and < 24h",
    ">24h")
return _compare

2. Result.

v-yangliu-msft_0-1603329978573.jpeg

You can download the PBIX file from here.

Best regards

Liu Yang

If this post helps,then consider Accepting it as the solution to help other members find it faster.

amitchandak
Super User
Super User

@Anonymous , Create a new column like this and use in visual

Switch(true(),
[Tempo Horas] <time(0,20,0) ," < 20 Min",
[Tempo Horas] <time(1,0,0) ," < 20 to 60 min",
[Tempo Horas] <time(5,0,0) ," < 60 min to 5 hrs",
[Tempo Horas] <=time(23,59,59) ," < 5 hrs to 1 day ",
">= 24 hrs"
)

 

Please provide your feedback comments and advice for new videos
Tutorial Series Dax Vs SQL Direct Query PBI Tips
Appreciate your Kudos.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.