Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi,
I try to create a new table with multiple new colums, but I get a syntax error.
When I Ctrl+X Ctrl+V the last lines of code and swift the positions of the two filters the later will not work anymore, while the first one starts to work.
Does anyone know where I made the mistake?
Solved! Go to Solution.
Hi @ThomasWeppler ,
You can change the Dax function after Return to try the following sub-functions:
Var x2=
Filter(
ADDCOLUMNS(x1,”total estimate”,[Estimate hours] + [Sub assignment estimate] ),
[ Sub assignment estimate] <> BLANK())
Return
filter(
ADDCOLUMNS ( x2,”total Registration”,[Registered hours] + [Sub assignment registration]),
[Sub assignment registration] <>BLANK())
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @ThomasWeppler
Please check the below codes and change the table and measures accordingly.
Summarized table =
VAR x1 =
SUMMARIZE (
'Recordings',
'Recordings'[ID],
'Recordings'[Actor],
Recordings[Hour],
"Estimate hours", DIVIDE ( Recordings[Hour], 60 ),
"Registered hours", DIVIDE ( Recordings[Hour], 60 ),
"Sub assignment estimate",
DIVIDE (
SUMX (
FILTER ( ALL ( Recordings ), Recordings[Hour] = EARLIER ( Recordings[Hour] ) ),
Recordings[Hour]
),
60
),
"Sub assignment registration",
DIVIDE (
SUMX (
FILTER ( ALL ( Recordings ), Recordings[Hour] = EARLIER ( Recordings[Hour] ) ),
Recordings[Hour]
),
60
)
)
VAR x2 =
FILTER (
ADDCOLUMNS (
x1,
"total estimate", [Estimate hours] + [Sub assignment estimate]
),
[Sub assignment estimate] <> BLANK ()
)
VAR x3 =
FILTER (
ADDCOLUMNS (
x1,
"total Registration", [Registered hours] + [Sub assignment registration]
),
[Sub assignment registration] <> BLANK ()
)
RETURN
UNION ( x2, x3 )
Hi @ThomasWeppler ,
You can change the Dax function after Return to try the following sub-functions:
Var x2=
Filter(
ADDCOLUMNS(x1,”total estimate”,[Estimate hours] + [Sub assignment estimate] ),
[ Sub assignment estimate] <> BLANK())
Return
filter(
ADDCOLUMNS ( x2,”total Registration”,[Registered hours] + [Sub assignment registration]),
[Sub assignment registration] <>BLANK())
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@ThomasWeppler , Can you please share formula in text format. I think some paranthesis are misplaced
Sure
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
105 | |
99 | |
99 | |
38 | |
37 |
User | Count |
---|---|
157 | |
121 | |
73 | |
73 | |
63 |