Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
boa tarde
Pessoal criei uma coluna no PBI, nela ela calcula o tempo entre datas desconsiderando sábado e domingo, porém em algumas linhas ele retorna com o valor de 48 horas, não consegui identificar, onde está o erro. Exemplo: data de input 16/10/2023 e envio federação 17/10/2023, deveria retornar 24, porém o resultado é 48.
Agradeço pela ajuda.
Solved! Go to Solution.
Hi @luciano1903 ,
For Ibendlin's answer I think it's correct, in your DAX code, WEEKDAY([Date],2)<6,24 is counting by days, that is why it returns 48 only in 16/10/2023-17/10/2023.
If you want to change all the results to 24 that's fine too.
Column =
VAR _A = SUMX(FILTER(CALENDAR('Table'[Data Input],'Table'[Data Output]),WEEKDAY([Date],2)<6),24)
VAR _AA = IF(_A = 48,24,_A)
RETURN _AA
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @luciano1903 ,
For Ibendlin's answer I think it's correct, in your DAX code, WEEKDAY([Date],2)<6,24 is counting by days, that is why it returns 48 only in 16/10/2023-17/10/2023.
If you want to change all the results to 24 that's fine too.
Column =
VAR _A = SUMX(FILTER(CALENDAR('Table'[Data Input],'Table'[Data Output]),WEEKDAY([Date],2)<6),24)
VAR _AA = IF(_A = 48,24,_A)
RETURN _AA
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The WEEKDAY(...,2) for these dates is 1 and 2.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |