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
Anonymous
Not applicable

Direct query message 'specified cast is not valid'

Hi,

 

I have two tables. Order headers and order lines. Linked by Order header ID. Table order headers are filled with customers, order numbers and currency conversion rates. Order lines contain all ordered itemnumbers, price per item and ordered qty. I made a column based calculation to calculate the total line price (LINE_PRICE = XXBI_ORDER_LINES_V[UNIT_SELLING_PRICE]*XXBI_ORDER_LINES_V[ORDERED_QUANTITY]*RELATED(XXBI_ORDER_HEADERS_V[CONVERSION_RATE]). When making a visual on ordernumber or customers trying to present the total sum line price, Power BI cannot display the visual and I get the message Can't display the visual (see attached printscreen). I tried also making a sum calculation within the order lines of the line prices (TOTAL_LINE_PRICE = SUM(XXBI_ORDER_LINES_V[LINE_PRICE]), but still the same message when trying to make a visual on customer or ordernumber

 

Please help!!!

 

Sales_output - Power BI Desktop_2018-10-17_08-50-20.png

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi, @Anonymous

I have tested on my side, but not reproduce the issue. if the data type of three columns XXBI_ORDER_LINES_V[UNIT_SELLING_PRICE]

XXBI_ORDER_LINES_V[ORDERED_QUANTITY]

XXBI_ORDER_HEADERS_V[CONVERSION_RATE]

is numerical?

and the data type of column LINE_PRICE is numerical?

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi Lin,

 

Thanks for you reply! All details are defined as number. Within the query mode I checked the details and unchecked for each detailed column any negative values or blanks. Still Power BI cannot display the line price (calculated column) in any visual. I still get below message (except for the ORA number).

 

Sales_output - Power BI Desktop_2018-10-19_10-10-02.png

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.

Top Solution Authors
Top Kudoed Authors