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 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
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
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...
User | Count |
---|---|
26 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
11 | |
10 | |
10 | |
9 |