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.
Hello all i have a below data.
Items | Value | DateTime |
Single-Top | 0.0340069 | 3/7/2024 2:28 |
Single-Top | 0.0340069 | 3/7/2024 4:10 |
Single-Top | 0.0340069 | 3/7/2024 8:07 |
Double Top | 0.5 | 3/7/2024 9:16 |
Double Top | 0.5 | 3/7/2024 9:22 |
Double Top | 0.5 | 3/7/2024 9:26 |
PTC | 10 | 3/7/2024 9:40 |
PTC | 10 | 3/7/2024 9:40 |
PTC | 10 | 3/7/2024 9:42 |
PTC | 10 | 3/7/2024 9:57 |
PTC | 10 | 3/7/2024 10:06 |
PTC | 10 | 3/7/2024 10:39 |
PTC | 10 | 3/7/2024 10:47 |
SDC | 0.7 | 3/7/2024 10:51 |
SDC | 0.7 | 3/7/2024 11:22 |
SDC | 0.7 | 3/7/2024 11:31 |
SDC | 0.7 | 3/7/2024 11:31 |
SDC | 0.7 | 3/7/2024 12:06 |
SDC | 0.7 | 3/7/2024 12:27 |
i have plotted a scatter plot on this. Now based on the datetime field i have to create these below parameters like Days, Hours,Minutes etc or like last N miutes, last n hours etc. Basically user needs a button or a dropdown.
@amitchandak please help if we can do this using a power query.
hi, @harshagraj
in power query make a three custome columns and use below code
for day
Date.Day([date])
for hour
Time.Hour([date])
for minute
Time.Minute([date])
or add below code in your advance editor
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each Date.Day([date])),
#"Added Custom1" = Table.AddColumn(#"Added Custom", "Custom.1", each Time.Hour([date])),
#"Added Custom2" = Table.AddColumn(#"Added Custom1", "Custom.2", each Time.Minute([date]))
Hi @Dangar332 thanks a lot for your response but i need a parameter or a slicer to be used to represent that datetime in day,hour,minute etc like this.
hi, @harshagraj
in power bi desktop go to modelling tab > new parameter >select field> drag and drop column of day,minute,hour(which we make in power query) > and select create
here column name is different from you
field parameter interface look like below
refer ARTICLE for more about Field parameter
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
102 | |
101 | |
78 | |
70 | |
63 |
User | Count |
---|---|
141 | |
106 | |
101 | |
85 | |
72 |