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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
erenonem
Frequent Visitor

Help with my dax

Hi all,

 

I m just trying to remove all my calculated columns with a measure contains a virtual table.

 

any chance to get any help?

 

//Normally I created a USD column in my Fact_XTable and SUMX it with another table in my measure.

All I want is to create a measure without a calculated column...

 

EVALUATE
VAR _vfxtable=


ADDCOLUMNS(Fact_Inspection,
// VALUES(Fact_XTable[XTable_sale_date]),
"CURR",
var __date=Fact_XTable[XTable_sale_date]
RETURN
MAXX(FILTER(Dim_Currency,Dim_Currency[Date]=__date
),
Dim_Currenct[Usd]
)
)

var _Isnotnull=FILTER(_vfxtable,Fact_XTable[XTable_sale_date]>DATE(2022,01,01))

RETURN
CALCULATE (
SUMX (
'Fact_XTable',
'Fact_XTable'[V1_Price] * CURR
),
ISBLANK ( 'Fact_XTable'[XTable_sale_date] ) = FALSE,
USERELATIONSHIP ( 'Fact_XTable'[XTable_sale_date], Dim_Calendar[Date] )
)

7 REPLIES 7
erenonem
Frequent Visitor

My bad, "There is no active relationship". so that couldnt use "related" function.

 

I am looking for a solution for fields that are both created as a calculated column in Power bi and fields from joins created for such purposes in SQL. If somehow I manage to use a "virtual" calculated column in a measure, then I may remove almost 100 calculated columns and many other SQL queries..

You could also use the LOOKUPVALUE fundtion?

I do use Lookupfuntion in my calculated column but I do not want to create a calculated column, and I dont know jow to use any lookup function in a measure..

FreemanZ
Super User
Super User

hi @erenonem 

what challenge do you face with the current code?

Hi,

 

Really sorry for late reply.

 

Error is 

erenonem_2-1677134466121.png

and you can see what I need below

erenonem_0-1677134383115.png

 

If there is an Active relationship, why don't you use the

RELATED(<column>)  

function?

My bad, "There is no active relationship". so that couldnt use "related" function.

 

I am looking for a solution for fields that are both created as a calculated column in Power bi and fields from joins created for such purposes in SQL. If somehow I manage to use a "virtual" calculated column in a measure, then I may remove almost 100 calculated columns and many other SQL queries..

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.