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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
naoki
Helper I
Helper I

Set value based on row data

I would like to set value for all to be true if one of the rows contain a certain data.  Each line is a unique transaction which I would want to track different items, so I cannot merge it together, as I would be showing a breakdown of each line and hide only those that is blank and show only those that have transaction. 

 

So if ABC only have 1 line but does not have data on that column it will hide it in my report, and as XYZ has at least 1 line of data it should show all lines. 

 

Below table is the expected results 

 

NameSalesResults
ABC False
XYZ1True
XYZ True
2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @naoki 

Check the below code.

Results = IF(CALCUALTE(COUNT(table[names]),ALLEXCEPT(table,table[Names]),NOT(ISNULL(table[sales])) && table[sales]>0) > 0

                 , "True"

                 , "False")

View solution in original post

Greg_Deckler
Community Champion
Community Champion

@naoki - Perhaps

Results =
  VAR __Name = MAX('Table'[Name])
  VAR __Table = FILTER(ALL('Table'),[Name] = __Name && NOT(ISBLANK([Sales])))
RETURN
  IF(ISBLANK(__Table),0,1)

You can then filter on Results being 1 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

@naoki - Perhaps

Results =
  VAR __Name = MAX('Table'[Name])
  VAR __Table = FILTER(ALL('Table'),[Name] = __Name && NOT(ISBLANK([Sales])))
RETURN
  IF(ISBLANK(__Table),0,1)

You can then filter on Results being 1 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @naoki 

Check the below code.

Results = IF(CALCUALTE(COUNT(table[names]),ALLEXCEPT(table,table[Names]),NOT(ISNULL(table[sales])) && table[sales]>0) > 0

                 , "True"

                 , "False")

amitchandak
Super User
Super User

@naoki , Not very clear assume sales ia measure,

if([sales] =0 || isblank([sales]), blank(),[sales])
if([sales] =0 || isblank([sales]), blank(),[sales])

 

Can you share sample data and sample output in table format

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak  I am unable to share the data as it contains confidential information. But maybe you can see below table for better clarity.  Late payment column is a calculated column which has been done. What that I would like to do is scan each line of acct name and to show only acct name with at least 1 line of late payment. If an acct does not have a single late payment it should not be shown. Payment check should also be a calculated column to show the results

 

Assuming this is the data set.  

NameInv #Inv DateSalesCustomer paid DateLate payment? Payment Check
ABC1231st Mar 2020103rd March 2020No 
XYZ2221st Apr 20201001st July 2020YesLate
XYZ3221st Aug 20201003rd Aug 2020Yes 

 

 

This should be how the results be shown. Only Acct XYZ will be shown, as one line is late. This is needed as I want to see how many lines and the details of the late payment for secondary analysis. 

 

NameInv #Inv DateSalesCustomer paid DateLate payment? Payment Check
XYZ2221st Apr 20201001st July 2020YesLate
XYZ3221st Aug 20201003rd Aug 2020Yes 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.