The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I was trying to convert this dax column in to measure which I'm failing, Can anyone of you help me on this?
IF(ISBLANK([Ship Date]),BLANK(),
CALCULATE(MIN('Table A'[Ship Date]),
FILTER('Table A','Table A'[Customer]=EARLIER('Table A'[Customer])),
FILTER('Table A','Table A'[Status]="Shipped"),
FILTER('Table A','Table A'[Item]<>"TAP")))
Solved! Go to Solution.
HI,
I am not sure how your semantic model looks like or how your expected outcome of the visualization looks like, but please try something like below whether it suits your requirement.
expected result measure: =
CALCULATE (
MIN ( 'Table A'[Ship Date] ),
FILTER (
'Table A',
'Table A'[Ship Date] <> BLANK ()
&& 'Table A'[Customer]
IN VALUES ( 'Table A'[Customer] )
&& 'Table A'[Status] = "Shipped"
&& 'Table A'[Item] <> "TAP"
)
)
Hi @Sri57 ,
You can create a measure as below to get it, and the precondition is the field [Ship Date] and [Customer] need to be applied on the visual.
Measure =
VAR _shipdate =
SELECTEDVALUE ( 'Table A'[Ship Date] )
VAR _customer =
SELECTEDVALUE ( 'Table A'[Customer] )
RETURN
IF (
ISBLANK ( _shipdate ),
BLANK (),
CALCULATE (
MIN ( 'Table A'[Ship Date] ),
FILTER (
ALLSELECTED ( 'Table A' ),
'Table A'[Customer] = _customer
&& 'Table A'[Status] = "Shipped"
&& 'Table A'[Item] <> "TAP"
)
)
)
Best Regards
Hi @Sri57 ,
You can create a measure as below to get it, and the precondition is the field [Ship Date] and [Customer] need to be applied on the visual.
Measure =
VAR _shipdate =
SELECTEDVALUE ( 'Table A'[Ship Date] )
VAR _customer =
SELECTEDVALUE ( 'Table A'[Customer] )
RETURN
IF (
ISBLANK ( _shipdate ),
BLANK (),
CALCULATE (
MIN ( 'Table A'[Ship Date] ),
FILTER (
ALLSELECTED ( 'Table A' ),
'Table A'[Customer] = _customer
&& 'Table A'[Status] = "Shipped"
&& 'Table A'[Item] <> "TAP"
)
)
)
Best Regards
HI,
I am not sure how your semantic model looks like or how your expected outcome of the visualization looks like, but please try something like below whether it suits your requirement.
expected result measure: =
CALCULATE (
MIN ( 'Table A'[Ship Date] ),
FILTER (
'Table A',
'Table A'[Ship Date] <> BLANK ()
&& 'Table A'[Customer]
IN VALUES ( 'Table A'[Customer] )
&& 'Table A'[Status] = "Shipped"
&& 'Table A'[Item] <> "TAP"
)
)
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
7 | |
6 |