Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
jaltoft
Resolver I
Resolver I

Replicate Excel formulae in Dax column

Can anyone help me replicate this formulae in DAX?

=IF([@[Open at Week End]]="N","",IFERROR(VLOOKUP([Ticket No.]],'Assessments'!L:Z,15,FALSE),""))

 

This is my attempt that returns different values -

 

Assessment Position =
CALCULATE (
FIRSTNONBLANK ( assessments[Position of Assessment], TRUE()),
FILTER (
assessmentswk,
assessmentswk[ReportWeekSunday] = Opencasesweekendsunday[ReportWeekSunday]
&& assessmentswk[Referral Ticket No.] = Opencasesweekendsunday[Ticket No.] )
)
 
In the Power bi I have a Report week Sunday which is the upload date.
4 REPLIES 4
jaltoft
Resolver I
Resolver I

Hello ,

 

An example would be-

Table 1 (Should only be one ticket number per week in table 1).

Upload date           Ticket number       Case state

24/01/2021               454545454          Wanted output from table 2

17/04/2021                11111111           Wanted output from table 2

 

Table 2 (We can have more than one case open and need to find if Open or closed or other)

24/04/2021               454545454          Open

24/04/2021               454545454          Open

17/01/2021                11111111           Closed

17/01/2021                11111111           Closed

17/01/2021                11111111           Closed

@amitchandak @V-pazhen-msft 

Hope this helps?

Hello @amitchandak @V-pazhen-msft this is the part of the formula I need to replicate if it wasnt clear?

=VLOOKUP([Ticket No.]],'Assessments'!L:Z,15,FALSE)

The issue is with the formulae I have tried in DAX I have either got an incorrect result or using a LOOKUPVALUE with the case state as the result column name, and search column as ticket number from table 1, Search value as ticket number from table 2,Upload date from table 1 as search column 2, Upload date from table 2 as search value 2) this isnt working as in table 2 it has multiple dates with ticket numbers.

I have also tried using First non blank which seems to bring the wrong result.

V-pazhen-msft
Community Support
Community Support

@jaltoft 
I agree, we need sample tables and please explain the logic as well. 

 

Paul

amitchandak
Super User
Super User

@jaltoft ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.