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

Join 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.

Reply
Laura0403
Frequent Visitor

Cannot Convert value of type text to type true false

Hi, 

 

I know there are a lot of solutions to this topic here. Unfortunatly I can't help myself by reading them.

I wanted to do calculate formula to get the values for the visual. I can't use my measure in the visual because of the error "Cannot Convert value of type text to type true false".

 

Berechneter Frachtumsatz =
CALCULATE (
    [Umsatz ohne GS],
    Prdo5_Sales[Artikel.Artikel Nr] = "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR_EDI",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR_AUTO",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR_AUTO_MD",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR_AUTO_X",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR_EDIMAUT",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FRACHTKOST",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FRACHTP",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR-HARDW",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FR-VBM",
    "FRACHT"
        || Prdo5_Sales[Artikel.Artikel Nr] = "FRACHT"
)
 
This is the whole Measure. 
 
Can someone help me? 
Thanks in advance 🙂 
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Laura0403 ,

Please use the below to shorten your code. Also could you check your data type for  [Umsatz ohne GS] is it in text?

 

Berechneter Frachtumsatz = =
CALCULATE (
    [Umsatz ohne GS],
    Prdo5_Sales[Artikel.Artikel Nr]
        IN {
        "FRACHT",
        "FR_EDI",
        "FR_AUTO",
        "FR_AUTO_MD",
        "FR_AUTO_X",
        "FR_EDIMAUT",
        "FRACHTKOST",
        "FRACHTP",
        "FR-HARDW",
        "FR-VBM",
        "FRACHT"
    }
)

 


BR

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi @Laura0403 ,

Please use the below to shorten your code. Also could you check your data type for  [Umsatz ohne GS] is it in text?

 

Berechneter Frachtumsatz = =
CALCULATE (
    [Umsatz ohne GS],
    Prdo5_Sales[Artikel.Artikel Nr]
        IN {
        "FRACHT",
        "FR_EDI",
        "FR_AUTO",
        "FR_AUTO_MD",
        "FR_AUTO_X",
        "FR_EDIMAUT",
        "FRACHTKOST",
        "FRACHTP",
        "FR-HARDW",
        "FR-VBM",
        "FRACHT"
    }
)

 


BR

Hi,

 

that worked, thanks a lot.

 

But I still don't understand why it worked. Can you maybe be so kind and explain it a little? 🙂

Anonymous
Not applicable

Hi @Laura0403 ,

This would be a syntax issue, the word "FRACHT" has been repeated in every filter argument.
In your case the text operator " || " would still work but would need to revised to follow as per 2nd example below:

Dax_Noob_0-1662969369092.png


BR 


Ahhh I understand. Thanks a lot 🙂

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.

Top Solution Authors