#powerbi #taik18
In This Video, We Have Demonstrated, How To Calculate AGE - Year Month Days Using DAX In Power BI - TAIK
--------------------------------------------------------------------------------------------------------------------------------------------
DOBThisYear = DATE(YEAR(TODAY()),'Student'[DOB].[MonthNo],'Student'[DOB].[Day])
MonthX =
var startmonth = MONTH(Student[DOB])
var endmonth = MONTH(TODAY())
var difdays = DATEDIFF(Student[DOBThisYear],TODAY(),DAY)
return if(endmonth-startmonth NOTEQUALS 0, if(difdays GREATERTHAN 30,endmonth-startmonth,(endmonth-startmonth)-1),0)
YearX = INT (YEARFRAC ( Student[DOB],TODAY(), 1 ) )
DateAddYearMonth = DATEADD(DATEADD(Student[DOB].[Date],Student[YearX],YEAR),Student[MonthX],MONTH)
DayX =
var valuex = DATEDIFF(Student[DateAddYearMonth].[Date],TODAY(),DAY)
var valueFinal = if (valuex GREATERTHAN 0,valuex,0)
return valueFinal
Age =
var YearX = Student[YearX]
var Monthx = Student[MonthX]
var Dayx = Student[DayX]
Var WYear = YearX & " Year(s) " & Monthx & " Month(s) " & Dayx & " Day(s)"
return
WYear
Note: In This Text I have used Text instead of symbol for GREATERTHAN & NOTEQUALS
--------------------------------------------------------------------------------------------------------------------------------------------
#powerbi, #taik18
Thanks for watching!
Join this channel to get access to perks:
/ @taik18
==================================================
Learn Power BI For FREE !!! check the below link
/ @taik18
Download related working files using this link
Power BI
https://drive.google.com/drive/folder...
Alteryx
https://drive.google.com/drive/folder...
==================================================
If You Like The Video, Click On THUMBS UP button, and don't forget to Subscribe To This Channel also press the BELL Icon to get the latest notification for new videos.
==================================================
Follow me on social media for the latest updates.
YouTube Channel Name: / taik18
LinkedIn: / mohammedadnant
Instagram : / mohammedadnant
Facebook: / mohammedadnant
twitter: / mohammedadnant
reddit: / mohammedadnant
==================================================
For Business / Freelance / Job Support / Personal Training / Corporate Training: [email protected]
Visit our website: www.taik18.com
Created By TAIK
Mohammed Adnan FTC Legal Disclaimer - Some links found in the description box of my videos may be affiliate links, meaning I will make commission on sales you make through my link. This is at no extra cost to you to use my links/codes, it's just one more way to support me and my channel! 🙂 I Use Techsmith Products For Video Creation,
If you are interested pls use the below links based on your location & product to get special discount
US & International:
TechSmith US Store page : https://techsmith.pxf.io/c/3201811/48...
Camtasia US Store page : https://techsmith.pxf.io/c/3201811/50...
Snagit US Store page : https://techsmith.pxf.io/c/3201811/47...
Europe:
TechSmith Germany Page : https://techsmith.pxf.io/c/3201811/47...
TechSmith France Page : https://techsmith.pxf.io/c/3201811/40...
TechSmith Spain Page : https://techsmith.pxf.io/c/3201811/61...