Forum Discussion
Dain
8 years agoFrequent Visitor
Date time filter,throughput,percentile
Hello All, Back again.:) I have a table with a column having a date time value. Submit time 5/02/2018 19:23:09 5/02/2018 19:50:00 5/02/2018 20:50:00 5/02/2018 20:57:00 5/02/2018 2...
- 8 years ago
Hi Dain,
Use DAX below to create two calculate column Date and Time using column DateTime and then create two slicers based on the two calculate column.
Date = DATE(YEAR(Table1[DateTime]), MONTH(Table1[DateTime]), DAY(Table1[DateTime])) Time = TIME(HOUR(Table1[DateTime]), MINUTE(Table1[DateTime]), SECOND(Table1[DateTime]))
Then create a measure to calculate the throughput per hour using DAX like this:
Result = VAR Total = CALCULATE(SUM(Table1[throughput ]), ALLSELECTED(Table1)) VAR Distance = DATEDIFF(CALCULATE(MIN(Table1[Date]), ALLSELECTED(Table1)), CALCULATE(MAX(Table1[Date]), ALLSELECTED(Table1)), HOUR) + DATEDIFF(CALCULATE(MIN(Table1[Time]), ALLSELECTED(Table1)), CALCULATE(MAX(Table1[Time]), ALLSELECTED(Table1)), HOUR) RETURN Total / Distance
The result is as below and PBIX here: https://www.dropbox.com/s/mhxn3259pp9yb2m/Date%20time%20filter%2Cthroughput%2Cpercentile.pbix?dl=0
Regards,
Jimmy Tao
v-yuta-msft
8 years agoCommunity Support
Hi Dain,
What do you mean about a start and end slicer? Do you mean user can input start date and end date in a slicer? The datetime slicer support this feature. Select "Between" option and user can input the start and end date in the two blanks.
Regards,
Jimmy Tao
Dain
8 years agoFrequent Visitor
No.I want to specify start date end date start time end time..