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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ksteever
Helper I
Helper I

Returning a value if multiple criteria met

I'm attempting to do some data analysis for our leadership within Jira. The problem we're trying to solve is showing what teams are involved with what epic level tasks.  I've created a new table called "EpicTable" via this code

 

EpicTable = FILTER('Jira', 'Jira'[issue type] = "epic")

 

 

On each line of the data in the 'Jira' table, there is a column called "Epic name" which typically (but not always) will have one of the Epic names from the Epic table list.  What I need to do is query the Jira table where if there are ANY matches to EpicTable["Epic Name"] == Jira["Epic Name"] and assignee contains "Joe" or "John", it returns a true value. If there are NO matches to those assignee values, the formula would return false.

 

Here's an example dataset that I did in Excel

ksteever_1-1706805046690.png

 

Team 1 = Joe, John

Team 2 = Jane

 

1 ACCEPTED SOLUTION
v-xiandat-msft
Community Support
Community Support

Hi @ksteever ,

idrissshatila , His scenario is correct, but I'll provide an answer to the error aspect on my end:

This error message appears to be that you have duplicate values in your EpicTable which is causing the error, may I suggest using the following DAX when creating the EpicTable:

 

EpicTable = VALUES(Jira[Epic Name])

 

vxiandatmsft_2-1706849828135.png

After that you can create calculated columns in the jira table:

 

Column = IF('Jira'[Epic Name] = RELATED('EpicTable'[Epic Name]) && 'Jira'[Assignee]in { "Joe","John"},"True","False")

 

And using this dax also requires a relationship between the two tables:

vxiandatmsft_0-1706849698393.png

The final output is shown in the following figure:

vxiandatmsft_1-1706849791908.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

8 REPLIES 8
v-xiandat-msft
Community Support
Community Support

Hi @ksteever ,

idrissshatila , His scenario is correct, but I'll provide an answer to the error aspect on my end:

This error message appears to be that you have duplicate values in your EpicTable which is causing the error, may I suggest using the following DAX when creating the EpicTable:

 

EpicTable = VALUES(Jira[Epic Name])

 

vxiandatmsft_2-1706849828135.png

After that you can create calculated columns in the jira table:

 

Column = IF('Jira'[Epic Name] = RELATED('EpicTable'[Epic Name]) && 'Jira'[Assignee]in { "Joe","John"},"True","False")

 

And using this dax also requires a relationship between the two tables:

vxiandatmsft_0-1706849698393.png

The final output is shown in the following figure:

vxiandatmsft_1-1706849791908.png

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi Xianda,

 

When I try to setup the relationship, I cannot get any cardinatlity or Cross filter direction to populate. I had to pivot from the name to the link as there could be duplicate names, but the links will always be unique. 

Epic Table created via clicking new table and pasting this in the code block

EpicTable = VALUES(Jira[Epic Link])

Then I tried to set the relationship since you mentioned the dependency.  Here's a screenshot of the manage relationships page:

ksteever_1-1707161450214.png

And of course, the formula to add the new column isnt working either. Assigneename is a column that has the parsed out name of the person contained in the assignee column so it's just that content and nothing else.

ksteever_2-1707161944350.png

 

 

Not sure what I did to undo the above but this is not working. Thanks! 

Hi @ksteever ,

You could try to create a one-to-many relationship between the Epic link in Epic table and the Epic link in Jira, since the Epic link in Epic table is a virtual table built from the Epic link in Jira. like this:

vxiandatmsft_0-1707269616967.png

To dax error , the main thing is that the RELATED function generally puts columns inside, and you can try putting columns into.

column = IF('Jira'[Epic Link] = RELATED('Epic table[Epic link]')&&'Jira'[AssigneeName] IN {"Joe","John"},"True","False")

Best Regards,

Xianda Tang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ksteever
Helper I
Helper I

Unfortunately I cannot attach the PowerBI file as it's too large and contains private company information. I forgot I had already parsed out the contents of Assignee into the column AssigneeName which contains string values only. Here's an example from the Epictable table:

ksteever_0-1706821191966.png

Here's the same line from the Jira table:

ksteever_1-1706821268452.png

The assigneename value also is a text/text type+format.

Idrissshatila
Super User
Super User

Hello @ksteever ,

 

add the following column in the Jira table

Column = IF('Jira Table'[Epic Name] = RELATED('Epic Table'[Epic Name]) && 'Jira Table'[Assignee]in { "Joe","John"},"True","False")

Idrissshatila_0-1706811871415.png

check the attached file i worked on to develop the above.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




I'm getting the error below when I use this. The Assignee and the Epic name column is Text formatted as text. 

ksteever_0-1706819899294.png

Here's the error:

ksteever_1-1706819940600.png

 

@ksteever ,

 

you need to fill the names in your power bi file, or attach your file and i will make it work.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.