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 September 15. Request your voucher.
I am running into some issues with a formula i am trying to create.
I want to add a column that returns "missed", "picked-up", or leave it blank based on several parameters. I created the formula the same way i would in excel but my inexperience might be showing here.
The columns are formatted as text for Shipment number and dates for Planned load.end and Ac.GI/GR Date
Solved! Go to Solution.
HI @jn55561n,
It seems like your expression are try to compare with different data type of values which Dax expression not supported.
For this scenario, I'd like to suggest you change these fields type or add convert function on your compare step to confirm the expression are compared with the same data type.
Missed vs Picked Up =
IF (
AND (
'Query1'[Shipment Number] <> "",
DATEVALUE ( 'Query1'[Planned load. end] ) < TODAY ()
),
IF ( 'Query1'[Ac.GI/GR Date] <> BLANK (), "Picked Up", "Missed" ),
""
)
Regards,
Xiaoxin Sheng
Here is the DAX code:
Missed vs Picked Up =
IF (
AND (
'Query1'[Shipment Number] <> "",
AND ( 'Query1'[Planned load. end] < TODAY (), 'Query1'[Ac.GI/GR Date] <> "" )
),
"Picked Up",
IF (
AND (
'Query1'[Shipment Number] <> "",
AND ( 'Query1'[Planned load. end] < TODAY (), 'Query1'[Ac.GI/GR Date] = "" )
),
"Missed",
""
)
)
HI @jn55561n,
It seems like your expression are try to compare with different data type of values which Dax expression not supported.
For this scenario, I'd like to suggest you change these fields type or add convert function on your compare step to confirm the expression are compared with the same data type.
Missed vs Picked Up =
IF (
AND (
'Query1'[Shipment Number] <> "",
DATEVALUE ( 'Query1'[Planned load. end] ) < TODAY ()
),
IF ( 'Query1'[Ac.GI/GR Date] <> BLANK (), "Picked Up", "Missed" ),
""
)
Regards,
Xiaoxin Sheng
User | Count |
---|---|
14 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
28 | |
18 | |
13 | |
7 | |
5 |