cancel
Showing results for
Did you mean:
Helper I

## calculation

Hi,
I calculated a column:
Orders with standard factor = IF('Fact_UM'[Factor] >'Fact_UM'[Standrad factor], 'Fact_UM '[Menge])
I would like to add that if standard factor is blank than column will show "no data"  in that row.

Thank you for help!
Aleks

1 ACCEPTED SOLUTION
Community Support

Hi @ALEKSGOD ,

Due to the limitations of calculated columns, using calculated columns will result in an error of "Expressions that yield variant data-type cannot be used to define calculated columns", it is recommended that you change the measure values and display them as a visual in the table.

(1)We can create a measure.

``Measure = IF(SUM('Table'[Column])==BLANK(),"no data",SUM('Table'[Column]))``

(2)Then the result is as follows.

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.

5 REPLIES 5
Community Support

Hi @ALEKSGOD ,

Due to the limitations of calculated columns, using calculated columns will result in an error of "Expressions that yield variant data-type cannot be used to define calculated columns", it is recommended that you change the measure values and display them as a visual in the table.

(1)We can create a measure.

``Measure = IF(SUM('Table'[Column])==BLANK(),"no data",SUM('Table'[Column]))``

(2)Then the result is as follows.

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly.

Community Champion

try lik

Column=
IF(
"no data",
IF('Fact_UM'[Factor] >'Fact_UM'[Standrad factor], 'Fact_UM '[Menge])
)
Helper I

Yes, I was trying this but doesn't work. I get this error "Expressions that yield variant data-type cannot be used to define calculated columns."

Community Champion

Hi @ALEKSGOD could you paste some sample data and let us have a look?

Helper I

- So,  factor is a calculated column:
Factor =

CALCULATE (
DIVIDE (
SUM ( 'Fact_UM'[x] ),
SUM ( 'Fact_UM2'[y] )
),
ALLEXCEPT ('Fact_UM', 'Fact_UM'[Factory Order nr.]))

- Standard Factor has many Blanks

Unfortunately, I cannot paste any data 😞

Announcements

#### Power BI T-Shirt Design Challenge 2023

Vote for your favorite t-shirt design now through March 28.

#### Power BI March 2023 Update

Find out more about the March 2023 update.

#### March 2023 Events

Find out more about the online and in person events happening in March!

Top Solution Authors
Top Kudoed Authors