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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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