Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi, I'm newbie to powerbi. Please do help .
My requirement is to acheive the below Output column(in green).
There are three columns OrderID ,Ordersequence,Estimated Arrival
for OrderID there will be some estimated arrival if it is there then it should be TRUE or it should be false
when the Ordersequence is 1 for OrderID and has estimated arrival for any ordersequence then the Ordersequence 1 should be true because one is considered as Origin
when the Ordersequence is 1 for OrderID and has no has estimated arrival for any ordersequence then the Ordersequence 1 should be False
If there is any estimated arrival for any ordersequence then the Origin(Ordersequence 1 ) should also be TRUE.
In the above example the OrderID 101 has some estimated arrival time so the Origin(OrderSequence 1 )is True
OrderID 102 doesnt have any estimated arrival so the the Origin(OrderSequence 1 )is False.
Thanks in Advance.
Solved! Go to Solution.
Please try this expression in a calculated column, replacing with your actual Table name to get the result shown.
Output Column =
VAR vThisID =
CALCULATE (
COUNTROWS ( Orders ),
ALLEXCEPT (
Orders,
Orders[Order_ID]
),
NOT (
ISBLANK ( Orders[EstimatedArrival] )
)
) > 0
RETURN
IF (
ISBLANK ( Orders[EstimatedArrival] ),
IF (
AND (
Orders[Order Sequence] = 1,
vThisID
),
TRUE (),
FALSE ()
),
TRUE ()
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Please try this expression in a calculated column, replacing with your actual Table name to get the result shown.
Output Column =
VAR vThisID =
CALCULATE (
COUNTROWS ( Orders ),
ALLEXCEPT (
Orders,
Orders[Order_ID]
),
NOT (
ISBLANK ( Orders[EstimatedArrival] )
)
) > 0
RETURN
IF (
ISBLANK ( Orders[EstimatedArrival] ),
IF (
AND (
Orders[Order Sequence] = 1,
vThisID
),
TRUE (),
FALSE ()
),
TRUE ()
)
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@Anonymous
if(isblank(estimated_arrival),False,true) , let me know if this works
Proud to be a Super User!
Hi
Thanks for your effort still the expected answer for ordersequence 1 also should have True because the OrderID 101 is having estimated arrival time.
Please see below
OrderID 101 is having some estimated arrival time in any ordersequnce so the orderid 1 is true , but for orderID 102 is not having any estimated arrival so it is False for all ordersequence.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
85 | |
67 | |
59 |
User | Count |
---|---|
150 | |
120 | |
100 | |
87 | |
68 |