Forum Discussion
sakuragihana
Helper IV
3 years agoNeed help for fixing dax not calculating correct
Hello everyone,
I have a dax for calculating Standard teaching time for teacher.
Standard Teaching Time =
VAR teacher_code = SELECTEDVALUE('List Class Schedule Teacher'[TeacherCode])
VAR filter_area = CALCULATETABLE('List Class Schedule Teacher', 'List Class Schedule Teacher'[TeacherCode] = teacher_code)
VAR part_time_distribution =
SUMX(
FILTER(filter_area, 'List Class Schedule Teacher'[TeacherContractType] = "Part Time" && 'List Class Schedule Teacher'[StartTime] <> 0),
'List Class Schedule Teacher'[TimeStandard] * [DayofWorking]
)
VAR full_time_distribution =
SUMX(
FILTER(filter_area, 'List Class Schedule Teacher'[TeacherContractType] = "Full Time" &&'List Class Schedule Teacher'[StartTime] <> 0),
'List Class Schedule Teacher'[TimeStandard] * [DayofWorking]
)
RETURN part_time_distribution + full_time_distribution
But in this visual this dax calculate Standard Teaching Time was not correct :
The correct visual is :Standard teaching time = 31.44
I have a Power BI in this link : https://drive.google.com/file/d/1OSZwDrcJIxzYbuxVwf9NwTzPy94ibFyk/view?usp=sharing
Please help me to fix this dax !
3 Replies
- Ashish_Mathur
Super User
Hi,
Explain the question in simple language rather than just posting a DAX formula. You are more likely to get a respone.
- sakuragihana
Helper IV
Hi Ashish_Mathur ,
Standard Teching Time = Part time + Full Time
Part Time is calculating by Time Standard for contract Part time and the same as for full time. But my dax is calculating that is not correct. Can you help me ?
- Ashish_Mathur
Super User
Hi,
I still do not understand. Someone else who does will help you.