The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I am geting an error returned on the following expression and I cannot seem to determine why through my research. The goal of the expression is to ensure the tax lot ID in the table is present for all purchase dates in the table. It is a consistancy data check. Here is an example of my expression.
Tax Lot Consistency Check =
VAR CurrentTaxLotID = [Tax Lot Id Constant 0]
VAR Current Date = [Business close Date]
VAR DistinctTaxLotIDs =
CALCULATE(DISTINCTCOUNT([Tax Lot Id Constant 0],
FILTER(ALLEXCEPT([Business close Date],
[Business close Date] = CurrentDate))
RETURNIF(DistinctTaxLotIDs = 1, TRUE(), FALSE())
You are trying to use DAX in a Power Query custom column. You can't do that. Power Query uses M, and the data model uses DAX.
--Nate
Hi @sking5844 ,
This is Power Query Editor
Power Query's backend language is M code, which means it can only recognize M code. but the code you provided is DAX, which are two completely different programming languages.
If you need to use the DAX language, go to Power BI Desktop and create measures, calculated columns, or calculated tables to use.
DAX overview - DAX | Microsoft Learn
Power Query M formula language reference - PowerQuery M | Microsoft Learn
Best Regards,
Dino Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The error is pointing at the Tax Lot Flag text. Presume it's a custom column and that's what you want to name it as? Would suggest to remove that so your code is just = then your Variables.
Looks like thta just moved the error down some.
Try taking the space out in your variable name...
VAR Current Date = [Business close Date]
No luck, still getting error.