Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello
I have date dimension with columns as Date, Month, and Year
and Fact table as
PLease help writing a dax function to calculate total hour when a date is selcted from the slicer. if 3rd of march is selected, result would be 4min 26 second, we can ignore seconds, 4 mins woild be ok. but if hour is there it would X hr Y Min.
What I have done so far as could not find any built in function:
ClockHour =
VAR MaxDate = MAX(ST_Hourly_Setups[ScannedDate]) // I could not filter the date selected from slicer here. or it is the silcer date
VAR maxHR = HOUR(MaxDate)
VAR maxMin = MINUTE(MaxDate)
VAR MinDate = MIN(ST_Hourly_Setups[ScannedDate]) // I could not filter the date selected from slicer here or it is the slicer date
VAR minHR = HOUR(MinDate)
VAR minMin = MINUTE(MinDate)
RETURN (((maxHR*60) + maxMin)) - (((minHR*60) + minMin))
Very poor!! i know, any alternative???
Solved! Go to Solution.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
23 | |
10 | |
10 | |
9 | |
7 |