Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want to show only working weekdays here, but I am getting an error, can you help me?
**
Load editor
SET ThousandSep='.';
SET DecimalSep=',';
SET MoneyThousandSep='.';
SET MoneyDecimalSep=',';
SET MoneyFormat='#.##0,00 ₺;-#.##0,00 ₺';
SET TimeFormat='hh:mm:ss';
SET DateFormat='DD.MM.YYYY';
SET TimestampFormat='DD.MM.YYYY hh:mm:ss[.fff]';
SET MonthNames='Oca;Şub;Mar;Nis;May;Haz;Tem;Ağu;Eyl;Eki;Kas;Ara';
SET DayNames='Pzt;Sal;Çar;Per;**bleep**;Cmt;Paz';
SET LongMonthNames='Ocak;Şubat;Mart;Nisan;Mayıs;Haziran;Temmuz;Ağustos;Eylül;Ekim;Kasım;Aralık';
SET LongDayNames='Pazartesi;Salı;Çarşamba;Perşembe;Cuma;Cumartesi;Pazar';
SET FirstWeekDay=0;
SET BrokenWeeks=0;
SET ReferenceDay=0;
SET FirstMonthOfYear=1;
SET CollationLocale='tr-TR';
Dimension=
NetWorkDays(Date#(MonthStart(Tarih),'DD.MM.YYYY'),Date#((Tarih),'DD.MM.YYYY'))
Best Regards,
If you don't want to show in dimension column itself, then it has nothing to do with the networkdays() function. You will need to write an if() condition on dimension and remove null values. Something like below:
=if(wildmatch(weekday(Tarih),'Sat','Sun'), null(), Tarih)
Use above expression in 'Tarih' dimension column and untick 'include null values' option.
Hope this helps.
Regards,
Aditya
From your screenshot, I don't see anything wrong in calculated net workdays according to the formula. Can you explain where you are getting wrong values ?
For eg. for date 08.01.2023, networkdays showing as 5 as 7th & 8th of Jan 2023 was weekend
Regards,
Aditya
Hi,
Can you try this code?
WeekDay(date(Tarih)) as Tarih_week_day
Thank you for reply.
Yes, I don't want it to show the date 08.01.2023 here, I want it to show only the weekday data.
how can I do that
If you don't want to show in dimension column itself, then it has nothing to do with the networkdays() function. You will need to write an if() condition on dimension and remove null values. Something like below:
=if(wildmatch(weekday(Tarih),'Sat','Sun'), null(), Tarih)
Use above expression in 'Tarih' dimension column and untick 'include null values' option.
Hope this helps.
Regards,
Aditya
Do you have to use a measure in the table?
I do not recommend the use of calculated dimensions, it is not a good practice. Prioritize restrictions via a set analysis.
King regards,
Théo ATRAGIE.
@theoat ,
In that case, you can use same logic in script inside where clause.
load
.....
from xyz.qvd where not wildmatch(weekday(Date),'Sat','Sun');
Regards,
Aditya