Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
chrisalexander
Regular Visitor

DAX expression - Token Literal Expected error

Hello Everyone!

 

Im running into an issue with the formula listed below.  Image below as well to show where the error is showing.  I am still new to learning DAX expressions and new to learning these type of errors in Power BI.  The colum type I text since I am trying to either pass a number or text value depending on the sitation.

 

Also my first post here. So bear with me on learning the proper information to write these.

 

if [Subsidiary]=100 && [Recharge Subsidiary]= 100 then "OVERHEAD" else if [Subsidiary]>0 && [Recharge Subsidiary]>0 then "00"&[Recharge Subsidiary] else if [Subsidiary]="" && [Recharge Subsidiary]>0 then "00"&[Recharge Subsidiary] else if [Subsidiary]=100 && [Recharge Subsidiary]="" then "OVERHEAD" else if [Subsidiary]="" && [Recharge Subsidiary]="" then "OVERHEAD" else if [Subsidiary]>0 && [Recharge Subsidiary]="" then "00"& [Subsidiary] else "TBD"

 

chrisalexander_1-1597240425132.png

 

 

2 REPLIES 2
camargos88
Community Champion
Community Champion

@chrisalexander ,

 

Use and instead of &&.

 

Power Query uses and and or

DAX uses && and ||



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



@camargos88 Thank you so much.  It worked!  Looks like an opportunity to do a little bit more reading up on DAX exprsessions and learning the syntax behind it.  Thank you again.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.