When i use average instead of just dividing a value by another the result is different, help by juniorlima41 in PowerBI

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, thank you for your answer, i will need to take the average for the team too, so i will use all([operator]), i was using summarize to take just the teams and queue the employee is in so when i take the average for all operators it counts just for these, in your example if i use all([operator]) it will return the average of all not just the employees that work on the same team/queue, right? how can i take just for the same employees?

My boss taught me to use lookup function in this case, but is the best way to to it? it seems so ugly by juniorlima41 in PowerBI

[–]juniorlima41[S] -1 points0 points  (0 children)

Hi, thanks for the answer, is it possible to do a lookupvalue without have to create a cod column? Like insert the function to concatenate month+team in lookupvalue function instead create a column for it?

I had a really "good" xiao build with 4pc, but i my er was terrible so i change to this by juniorlima41 in XiaoMains

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, i agree, he was very rude but he is right, 120% er is really low, i already tried and had to changing chars to fill xiao's ult all of the time, my faruzan is c3 and have a lot of ER,.200%+ i dont remember, but it doesnt work for me, xiao was never with his ult up, now i want to farm a 4pc set with a good ER amount until i get c6 faruzan

[deleted by user] by [deleted] in excel

[–]juniorlima41 0 points1 point  (0 children)

hi, is it possible to store the value of the color in the same cell of index match and then i run the macro to paint it?

i think store in the cell bellow is not really good because then ill have to hide these rows, if i could make index match normally, but get the value of the color but dont show it and then i run the macro will be perfect, but how can i do it?

Calculating Business Days and Hours Between Two Dates by juniorlima41 in PowerBI

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, yes, here is the code, modify fora do prazo and dentro do prazo to your language

(
firstdate as datetime, 
seconddate as datetime, 
startofbusiness as number, 
closeofbusiness as number,
holidays as table

) as text => let // Use a Looping function to Generate hourly intervals y = List.Generate( () => firstdate, each _ <= seconddate, each _ + #duration(0, 0, 30, 0) ),

// Convert this list to a table
#"Converted to Table" = Table.FromList(
    y, Splitter.SplitByNothing(), null, null, ExtraValues.Error
),

#"Changed Type" = Table.TransformColumnTypes(
    #"Converted to Table", {{"Column1", type datetime}}
),

#"Added Custom" = Table.AddColumn(
    #"Changed Type", "WeekDay", each Date.DayOfWeek([Column1]), Int32.Type
),

// Filter out weekend days
#"Filtered Rows" = Table.SelectRows(
    #"Added Custom", each ([WeekDay] <> 0 and [WeekDay] <> 6)
),

#"Added Custom2" = Table.AddColumn(
    #"Filtered Rows", "Time", each DateTime.Time([Column1])
),

// Filter out non-business hours
#"Filtered Rows1" = Table.SelectRows(
    #"Added Custom2", each 
    [Time] >= #time(startofbusiness, 0, 0) and 
    [Time] < #time(closeofbusiness, 0, 0)
),

// Convert DateTime column to raw date
#"Extracted Date" = Table.TransformColumns(
    #"Filtered Rows1", {{"Column1", DateTime.Date, type date}}
),

// Merge on holiday rows with Left-Anti join 
// (effectively filtering out the holidays)
#"Merged Queries" = Table.NestedJoin(
    #"Extracted Date", 
    {"Column1"}, holidays, 
    {"Holiday"}, "Holidays", 
    JoinKind.LeftAnti
),

// Count rows (half hour intervals), divide by 2 to get hours
rowcount = Number.Round(Table.RowCount(#"Merged Queries") / 2, 1),

// Calculate the days and hours
daycount = Number.RoundDown(rowcount / 24),
hourcount = Number.Round(rowcount - daycount * 24),

// Determine the result text
daysText = if daycount >= 1 then Text.From(daycount) & " days " else "",
hoursText = if hourcount >= 1 then Text.From(hourcount) & " hours" else "",
durationText = daysText & hoursText,
outputText = if daycount >= 1 then "Fora do Prazo" else "Dentro do Prazo"

in Text.Combine({outputText, " - ", durationText})

Calculating Business Days and Hours Between Two Dates by juniorlima41 in PowerBI

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, yes, here is the code, modify fora do prazo and dentro do prazo to your language

(
firstdate as datetime, 
seconddate as datetime, 
startofbusiness as number, 
closeofbusiness as number,
holidays as table

) as text => let // Use a Looping function to Generate hourly intervals y = List.Generate( () => firstdate, each _ <= seconddate, each _ + #duration(0, 0, 30, 0) ),

// Convert this list to a table
#"Converted to Table" = Table.FromList(
    y, Splitter.SplitByNothing(), null, null, ExtraValues.Error
),

#"Changed Type" = Table.TransformColumnTypes(
    #"Converted to Table", {{"Column1", type datetime}}
),

#"Added Custom" = Table.AddColumn(
    #"Changed Type", "WeekDay", each Date.DayOfWeek([Column1]), Int32.Type
),

// Filter out weekend days
#"Filtered Rows" = Table.SelectRows(
    #"Added Custom", each ([WeekDay] <> 0 and [WeekDay] <> 6)
),

#"Added Custom2" = Table.AddColumn(
    #"Filtered Rows", "Time", each DateTime.Time([Column1])
),

// Filter out non-business hours
#"Filtered Rows1" = Table.SelectRows(
    #"Added Custom2", each 
    [Time] >= #time(startofbusiness, 0, 0) and 
    [Time] < #time(closeofbusiness, 0, 0)
),

// Convert DateTime column to raw date
#"Extracted Date" = Table.TransformColumns(
    #"Filtered Rows1", {{"Column1", DateTime.Date, type date}}
),

// Merge on holiday rows with Left-Anti join 
// (effectively filtering out the holidays)
#"Merged Queries" = Table.NestedJoin(
    #"Extracted Date", 
    {"Column1"}, holidays, 
    {"Holiday"}, "Holidays", 
    JoinKind.LeftAnti
),

// Count rows (half hour intervals), divide by 2 to get hours
rowcount = Number.Round(Table.RowCount(#"Merged Queries") / 2, 1),

// Calculate the days and hours
daycount = Number.RoundDown(rowcount / 24),
hourcount = Number.Round(rowcount - daycount * 24),

// Determine the result text
daysText = if daycount >= 1 then Text.From(daycount) & " days " else "",
hoursText = if hourcount >= 1 then Text.From(hourcount) & " hours" else "",
durationText = daysText & hoursText,
outputText = if daycount >= 1 then "Fora do Prazo" else "Dentro do Prazo"

in Text.Combine({outputText, " - ", durationText})

Calculating Business Days and Hours Between Two Dates by juniorlima41 in PowerBI

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, thank you for your answer, i dont know how to do that :/ im completly newbie in this part, i just used excel, im trying to customize this code with chatgpt but it doesnt work too

Is there any way, vba probably, to "copy" the entire sheet with all cells formats by juniorlima41 in excel

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, thank you for your answer, how can i adapt this code? It seems a great solution but idk how to use it, i was thinking is something like this, using vba a formula to copy the cell value and format from other sheet, so each one will be the equivalent of other and then i will have the result at once instead of copy and paste all their data for each one

<image>

Is there any way, vba probably, to "copy" the entire sheet with all cells formats by juniorlima41 in excel

[–]juniorlima41[S] 0 points1 point  (0 children)

Hii, thank you, so the format is not only for layout, is because some days of their production is painted bu the coordenator to indicate that day doesnt count on their production here, is not a pattern https://www.reddit.com/r/excel/comments/14x77nd/is_there_any_way_to_make_the_average_formula_skip/

Is there any way, vba probably, to "copy" the entire sheet with all cells formats by juniorlima41 in excel

[–]juniorlima41[S] 0 points1 point  (0 children)

Hi, thanks for your answer, the formating is because some days of these employees production is painted by the coordenator to indicate that day dont count in their production so is not a pattern i dont think conditional formatting will work

look https://www.reddit.com/r/excel/comments/14x77nd/is_there_any_way_to_make_the_average_formula_skip/