The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everyone, I have a power BI file with dax :
The dax can not calculate the total of Standard Teaching Time
I make a power BI file with table data in this link:https://drive.google.com/file/d/1kc-GrVz2PvPxhUEBCq9yandeIvCUR_x4/view?usp=drive_link
Can everyone help me to fix this dax for calculating total ?
Solved! Go to Solution.
Hi @sakuragihana
Please refer to attched amended file with the solution
Standard Teaching Time =
SUMX (
CROSSJOIN (
VALUES ( 'Contract'[FulltimeTypeCode] ),
SUMMARIZE ( 'Teacher Schedule', 'Teacher Schedule'[Teacher Code], 'Teacher Schedule'[DateNameSched] )
),
VAR filer_standard =
FILTER ( CALCULATETABLE ( 'StandardTime' ), 'StandardTime'[WeekDay] = 'Teacher Schedule'[DateNameSched] )
VAR distribution =
SUMX ( filer_standard, 'StandardTime'[Time Standard] )
VAR Countdayofweek = [DayOfWeekCount]
VAR Result = Countdayofweek * distribution
RETURN
Result
)
Hi @sakuragihana
Please refer to attched amended file with the solution
Standard Teaching Time =
SUMX (
CROSSJOIN (
VALUES ( 'Contract'[FulltimeTypeCode] ),
SUMMARIZE ( 'Teacher Schedule', 'Teacher Schedule'[Teacher Code], 'Teacher Schedule'[DateNameSched] )
),
VAR filer_standard =
FILTER ( CALCULATETABLE ( 'StandardTime' ), 'StandardTime'[WeekDay] = 'Teacher Schedule'[DateNameSched] )
VAR distribution =
SUMX ( filer_standard, 'StandardTime'[Time Standard] )
VAR Countdayofweek = [DayOfWeekCount]
VAR Result = Countdayofweek * distribution
RETURN
Result
)
Hi @tamerj1 ,
If I want to calculate Standard Teaching Time for all of month .
Example : January 2023 have 31 days
Mon : 5 days
Tue : 5 days
Wed: 4 days
Thu : 4 days
Fri : 4 days
Sat: 4 days
Sun: 5 days
Can you help me to calculate standard teaching time for whole of months follow distribution of day ?
@sakuragihana
I did some modifications on the data model and the Standard Teaching Time measure. Please refer to attached for more details.
Hi @tamerj1 ,
I want to calculate Standard Teaching Time follow of DaysofWeekFullMonth by distribution . In this file the Standard Teaching Time was calculated by DayofWeekCount
Can you help me ?
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
5 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |