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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
vally57
Helper I
Helper I

conversion of column to dax measure

I am trying to convert a column to measure which somehow the result is not getting as expected.
IF (
ISBLANK ( [TM Act Check-In Date vs TM Plan Ship Date] ),
BLANK (),
CALCULATE (
AVERAGE ( 'Delivery'[TM Act Check-In Date vs TM Plan Ship Date] ),
FILTER (
'Delivery',
'Delivery'[Delivery Doc]
= EARLIER ( 'Delivery'[Delivery Doc] )
),
FILTER (
'Delivery',
'Delivery'[Order Status] = "1 - Shipped"
),
FILTER (
'Delivery',
'Delivery'[Item] <> "TAP"
)
)
)
I have converted the above column to below measure:
VAR CurrentDeliveryDoc = MAX('Delivery'[Delivery Doc])
var a = max([TM Act Check-In Date vs TM Plan Ship Date])
VAR FilteredData =
FILTER(
'Delivery',
'Delivery'[Delivery Doc] = CurrentDeliveryDoc
&& 'Delivery'[Order Status] = "1 - Shipped"
&& 'Delivery'[Item] <> "TAP"
)
RETURN
IF(
ISBLANK(a),
BLANK(),
CALCULATE(
average('Delivery'[TM Act Check-In Date vs TM Plan Ship Date]),
(FilteredData)
)
), but the result is not as expected



2 REPLIES 2
Anonymous
Not applicable

Hi @vally57 ,

Any update on this? Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.