Forum Discussion
Rounding minutes up
Hello,
i have a problem with a datetime value. i need to get the minutes of different entries to the same value. se pictures below.
i found a switch case solution that would look for the minutes in a given time and change it to what i need. but i lost the datepart. I tried to put something together in a new colum, but didnt work in the slicer for the visiual.
Maybe there is a simpler solution?
Thanks for the help.
I need that the time if the waage 17,18,19,20 is at the same time 02:30:00
4 Replies
- AnonymousNot applicable
Hi armvoss,
Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
- armvoss
Helper I
Hello,
i found a solution for my problem:
Spalte 2 = DATE(YEAR(GksMesswerte[Zeitpunkt]),MONTH(GksMesswerte[Zeitpunkt]),DAY(GksMesswerte[Zeitpunkt])) + TIME(HOUR( GksMesswerte[Zeitpunkt] ),SWITCH(TRUE(),MINUTE( GksMesswerte[Zeitpunkt] ) >= 55, 55,MINUTE( GksMesswerte[Zeitpunkt] ) >= 50, 50,MINUTE( GksMesswerte[Zeitpunkt] ) >= 45, 45,MINUTE( GksMesswerte[Zeitpunkt] ) >= 40, 40,MINUTE( GksMesswerte[Zeitpunkt] ) >= 35, 35,MINUTE( GksMesswerte[Zeitpunkt] ) >= 30, 30,MINUTE( GksMesswerte[Zeitpunkt] ) >= 25, 30,MINUTE( GksMesswerte[Zeitpunkt] ) >= 20, 20,MINUTE( GksMesswerte[Zeitpunkt] ) >= 15, 15,MINUTE( GksMesswerte[Zeitpunkt] ) >= 10, 10,MINUTE( GksMesswerte[Zeitpunkt] ) >= 5, 5,MINUTE( GksMesswerte[Zeitpunkt] ) >= 0, 0),0
in the quickinfo last 2 columns. Last column "Zeitpunkt" is the column from the Database. "Spalte2" is my calculated column. But strange thing is: according to Power BI data is there until 12.09.22. But data is availabe till today. Even if i change the x axis back to original the newest date stays 12.09.2022but the entries in the data base are there
can anyone help?
)