Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I need some help, ive been trying on my own but i cant get it to work.
I have a Date table using the CALENDAR function and now i have a formula that converts the dates into workindays with this formula.
Weekday =
IF (
OR (WEEKDAY ('Date'[Date]) = 1; WEEKDAY ('Date'[Date] ) = 7 );
FALSE;
TRUE
)
i use this formula in other tables and it works however i cant seem to be able to convert this form 'Tekst' to 'True/False'.
It returns an error stating that it can't convert to a True/False type.
The result is that my formula in another table returns another error because of the error.
DAX comparison operations do not support comparing values of type Text with values of type True/False. Consider using the VALUE or FORMAT function to convert one of the values.
Doorlooptijd Ticket = VAR DIFF =
CALCULATE (
COUNTROWS ( 'Date' );
ALL ( 'Date' );
DATESBETWEEN (
'Date'[Date];
Tickets[Ticketstart];
IF ( ISBLANK ( Tickets[Ticketstop]); TODAY (); Tickets[Ticketstop] )
);
'Date'[Weekday] = TRUE()
)
RETURN
IF ( DIFF = 1; 1; DIFF)
Solved! Go to Solution.
Strange; after I switched Windows to Nederlands (Nederland) it works with me: take look at this 23 sec video.
Just like WeekdayMB = MOD(WEEKDAY('Date'[Date]);6)<>1
Hi @RvdHeijden,
In your formula the format of the results aren't equal try doing this change
Doorlooptijd Ticket = VAR DIFF =
CALCULATE (
COUNTROWS ( 'Date' );
ALL ( 'Date' );
DATESBETWEEN (
'Date'[Date];
Tickets[Ticketstart];
IF ( ISBLANK ( Tickets[Ticketstop]); TODAY (); Tickets[Ticketstop] )
);
'Date'[Weekday] = TRUE()
)
RETURN
IF ( DIFF = "1"; 1; DIFF)
making the 1 into text should work
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThanks for your help but the error remains the same.
I think that the error is being triggered by the fact that the 'red' part of the formula refurs to a formula that has the data type of 'Tekst' where it should be 'True/False' but i can't seem to convert that colum.
Your change in the formula had no effect im afraid
Try this
IF ( FORMAT(DIFF;"#") = "1"; 1; DIFF)
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsSorry, still the same error
Doorlooptijd Ticket = VAR DIFF =
CALCULATE (
COUNTROWS ( 'Date' );
ALL ( 'Date' );
DATESBETWEEN (
'Date'[Date];
Tickets[Ticketstart];
IF ( ISBLANK ( Tickets[Ticketstop]); TODAY (); Tickets[Ticketstop] )
);
'Date'[Weekday] = TRUE()
)
RETURN
IF ( FORMAT(DIFF;"#") = "1"; 1; DIFF)
Maybe:
Weekday =
IF (
OR (WEEKDAY ('Date'[Date]) = 1; WEEKDAY ('Date'[Date] ) = 7 );
FALSE();
TRUE()
)
Sorry, no effect.
That formula already worked but the data type is wrong, its set to 'Tekst' but i cannot convert it to 'True/False'.
I believe that if i can change that the other formula will work.
Its either that or change the other formula so that it can coop with tekst values instead of true/false
Strange; after I switched Windows to Nederlands (Nederland) it works with me: take look at this 23 sec video.
Just like WeekdayMB = MOD(WEEKDAY('Date'[Date]);6)<>1
The funny thing is that ive added a new column (like i did multiple times before) and now the formula works and the formula is in the right data format.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 76 | |
| 37 | |
| 31 | |
| 27 | |
| 27 |