DAX Fridays! #31: Rounding Time, Prices and Numbers with DAX
Vložit
- čas přidán 5. 07. 2024
- In today’s DAX Fridays video I will show you how to round time, prices and numbers using ROUND, ROUNDUP, ROUNDDOWN, INT, TRUNC, ODD, EVEN, MROUND, FLOOR and CEILING.
Rounding numbers, time and prices is a very useful skill as it will give you more control of your dataset and the accurancy in which your numbers are presented.
Chapters:
00:00 Intro
01:01 Round to the nearest number with ROUND
02:37 Round up to the nearest number with ROUNDUP
03:16 Round down to nearest number with ROUNDDOWN
04:11 Round down prices to the nearest integer with INT
05:00 Remove decimals from the number with TRUNC
05:48 Round up to the nearest odd number using ODD
06:11 Round down to the nearest odd number using ODD
07:43 Round prices to the nearest 0.05 of a euro cent with MROUND
08:58 Round down prices to the nearest 0.05 of a euro cent with FLOOR
09:23 Round up prices to the nearest 0.05 of a euro cent with CEILING
10:56 Round time to the nearest hour with MROUND
11:45 Round up time to the nearest 15 minutes with CEILING
12:31 Round down time to the nearest 15 minutes with FLOOR
Done!
Link to Power BI file used in the video: curbal.com/blog/glossary/roun...
EXCEL SURVEY: 1drv.ms/xs/s!Ar8CDNp8cGTcgjaH...
PREVIOUS VIDEO: • DAX Fridays! #30: SEAR...
NEXT VIDEO:
Looking for a download file? Go to our Download Center: curbal.com/donwload-center
SUBSCRIBE to learn more about Power and Excel BI!
/ @curbalen
Our PLAYLISTS:
- Join our DAX Fridays! Series: goo.gl/FtUWUX
- Power BI dashboards for beginners: goo.gl/9YzyDP
- Power BI Tips & Tricks: goo.gl/H6kUbP
- Power Bi and Google Analytics: goo.gl/ZNsY8l
ABOUT CURBAL:
Website: www.curbal.com
Contact us: www.curbal.com/contact
QUESTIONS? COMMENTS? SUGGESTIONS? You’ll find me here:
► Twitter: @curbalen, @ruthpozuelo
► Google +: goo.gl/rvIBDP
► Facebook: goo.gl/bME2sB
#daxfridays #curbal #SUBSCRIBE
► Linkedin: goo.gl/3VW6Ky
Such an amazing video Ruth!!!, simple examples to understand better how we can round up and down among prices, time, and numbers. Among all the other similar videos out there, I will try to search for curbal first!!
Wonderful video! Thanks Ruth!
🥳
Oh Curbal, how good you exist... Explaining this stuff so humanly, without any of the "corporate positivity" vibe that some of the other PBI CZcamsrs have. Thank you so much. :)
My pleasure :)
Hey Ruth , again a very interesting video and now it's weekend 🌞🌞🌞👍🏻👍🏻👍🏻 thanks a lot and have yourself a great weekend !
+SmartBimson Hi Andy! Yes, finally Friday! 💃
Have a great weekend too! :)
/Ruth
very helpful video
Excellent Summary of all functions / Options to round . Much thanks for sharing this to us :)
+Saravanan Pichaipillai You welcome Saravanan, really happy it was useful for you :)
/Ruth
THANK YOU So MUCH!!
absolutely what im searching for....rounding Time....spend hours with no solution. THX
Glad it helped :)
/Ruth
I have hard time working with rounding time using functions.
next time, I feel better !
Thank You !!
+Excel & VBA Reference Guide You welcome! Happy it was useful :)
/Ruth
Got it! Gud to go nw!
Great! See u soon! :)
/Ruth
Hi Ruth do you have an idea on how to derive the Fiscalquarters in a datestable where the m code offers to specify the date range and the Fiscal Month start. So basically I can enter 4 if the fiscal year starts in april but I somehow need a formula in m to get an extra column which based on the parameter entered (this case april) no calculates the fiscal quarter for each row in my datestable. I think it somehow could work with dividing by x and rounding based on the entered fiscal month start number but I am currently stuck.
Thank you
Hi Daniel, haven’t tried it myself, so I couldn’t tell you how.. Have you tried in the Power BI community? I am sure someone has!
/Ruth
Thanks. Yes but so far no luck beside some hardcoded solutions which do not fit
Would you be able to tell me how to round time down? I am unable to do it. I want to be able to see how many transactions were done each hours in a specific hour. I am trying = RUNDOWN(Query[TIME], 1) and does not work, even = RUNDOWN(Query[TIME], "1:00") with no luck
Hi
Is it possible if you have retail price in one column, For example, simplest way for me to explain
Any figures between 17.01 and 17.50 goes to 17.45
Any figures between 17.51 to 17.99 goes to 17.95
Thanks
Declan
Hi Ruth nice DAX series if possible try to start M language functions videos series
I have that every Monday, although it is more example based.
/Ruth