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 need to implement the below logic in DAX :
If (LW_SEND_END_DATE_TIME is not NULL) and (LW_SEND_START_DATE_TIME is not NULL) and DOCUMENT_ERROR_STEP not Like "%SEND%" ) then AVG (LW_SEND_END_DATE_TIME - LW_SEND_START_DATE_TIME)
and I am very new at Power BI, can anyone help me on this?
Solved! Go to Solution.
@Anonymous ,
You may simply try FILTER, CONTAINSSTRING and AVERAGEX.
FILTER =
VAR ENDSTART = LW_SEND_END_DATE_TIME - LW_SEND_START_DATE_TIME RETURN IF (LW_SEND_END_DATE_TIME <> BLANK() && LW_SEND_START_DATE_TIME <> BLANK() && DOCUMENT_ERROR_STEP <> "%SEND%" , CALCULATE( AVERAGE(ENDSTART)))
Maybe something like this?
@Anonymous ,
You may simply try FILTER, CONTAINSSTRING and AVERAGEX.
Hi @Anonymous,
For an accurate response you need to show the tables in your data model involved in the calculation and explain what each element in your formula is. Without that information, i would venture this:
IF(NOT ISBLANK(LW_SEND_END_DATE_TIME) && NOT ISBLANK(LW_SEND_START_DATE_TIME) && DOCUMENT_ERROR_STEP<>"%SEND%", AVERAGE (LW_SEND_END_DATE_TIME - LW_SEND_START_DATE_TIME))
I'm not clear on the red part because I need the explanation mentioned above.
Please read through these posting tips (particularly the bits in red). By following them, you will increase the probability of getting your questions answered quickly and you will make things much easier for people trying to help.
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 |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |