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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Maheshguptaz
Helper III
Helper III

Need help with DAX

Hi all ,

I'm unable to get the logic to implement in DAX for one of the queries that I have. 

Scenario:

I've 3 columns namely "Report_Name", "User_List" and "User_status".

if a report is shared with 3 users and out of these 3, any 1 user is active from the User_List then I need the output as "Retain". If all the user's status is Inactive, I need the output as "Delete".

Below is a sample of the data:

Report_NameUser_ListUser_statusOutput
Report1User1ActiveRetain
Report1User2ActiveRetain
Report1User3ActiveRetain
Report1User4InactiveRetain
Report1User5InactiveRetain
Report2User6InactiveDelete
Report2User5InactiveDelete
Report2User7InactiveDelete
Report2User8InactiveDelete

Any help with this is appreciated. Thanks in advance!!

Regards
Mahesh

1 ACCEPTED SOLUTION
Daniel29195
Super User
Super User

@Maheshguptaz 

output

Daniel29195_0-1708686303607.png

Column = 
var r = Table2[Report_Name]

var f= 

FILTER(
    Table2,
    Table2[Report_Name] = r && Table2[User_status] = "Active"
)

return
IF(ISEMPTY(f),"Delete","Retain")

 

let me know if this works. 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

View solution in original post

1 REPLY 1
Daniel29195
Super User
Super User

@Maheshguptaz 

output

Daniel29195_0-1708686303607.png

Column = 
var r = Table2[Report_Name]

var f= 

FILTER(
    Table2,
    Table2[Report_Name] = r && Table2[User_status] = "Active"
)

return
IF(ISEMPTY(f),"Delete","Retain")

 

let me know if this works. 

 

 

If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.