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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
jeongkim
Post Prodigy
Post Prodigy

Expressions that yield variant data-type cannot be used to define calculated columns.

Hi,

 

earfcnDL value refererred is Whole number format.

So I wrote the code as number, this not working. 

 

jeongkim_0-1751456745820.png

 

 

But the other TEST PBI has enrfcnDL is Text format.

So I wrote the code as text values, this working

jeongkim_1-1751456821343.png

 

 

 

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@jeongkim Try using Format

 

Max Power Hz =
SWITCH(
TRUE(),
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2500", "850 Mhz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1350", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "275", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2850", "2.6 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "3200", "2.6 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1550", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1694", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1650", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "3743", "900 Mhz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "450", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "475", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2600", "850 Mhz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "100", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2050", "2.6 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "3050", "2.6 Ghz"
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@jeongkim Try using Format

 

Max Power Hz =
SWITCH(
TRUE(),
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2500", "850 Mhz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1350", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "275", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2850", "2.6 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "3200", "2.6 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1550", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1694", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "1650", "1.8 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "3743", "900 Mhz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "450", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "475", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2600", "850 Mhz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "100", "2.1 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "2050", "2.6 Ghz",
FORMAT('LNCEL_FDD'[earfcnDL], "0") = "3050", "2.6 Ghz"
)




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






It worked, thank you

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors