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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jpat1234
New Member

unable to update row data - conditional column

Hi, 

 

I am trying to update conditional column row data based on calculation. below is my sample data. need to display certain catagories data as issue for all entries fort he same id,  if one entry for that has issue. all other logic remains same. 

for below data, id 2005 - has 4 entries - 1 issue , 3 good. need to show all 4 as issue in that case. 

tried several formulas but didn't work. wondering if we can achieve this in powerbi desktop ? this is my first time with it. 

 

date  IDcategoryanswerfollowupskippedCustomgoodFupSkipIssue
5/19/2020200612390000000FalseFalseG1   
5/19/2020200612380000001TRUEFalseFup 1  
5/19/2020200612390000000FalseFalseG1   
5/19/2020200510490000000FalseFalseG1   
5/19/2020200510490000000FalseFalseG1   
5/19/2020200510490000000FalseFalseG1   
5/19/2020200510480000001FalseFalseI   1
5/19/202020055690000000FalseFalseG1   
5/19/202020055690000000FalseFalseG1   
5/19/202020055680000001TrueFalseFup 1  
5/19/20202005280000001TrueFalseFup 1  
5/19/20202005280000001TrueFalseFup 1  
4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @jpat1234 ,

 

You may create measure like DAX below.

 

CountIssue=

VAR d= CALCULATE(COUNT(Table1[category]),FILTER(ALLSELECTED(Table1), Table1[ID] =MAX(Table1[ID])))

RETURN

IF(COUNTROWS(FILTER(Table1, Table1[ID]=MAX(Table1[ID])&& Table1[Issue] <> BLANK())) >1, d ,0)

 

Best Regards,

Amy 

 

Community Support Team _ Amy

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

 

mahoneypat
Microsoft Employee
Microsoft Employee

Please try this expression in your calculated column.  I called the table 'Issues'.

 

ThisIDHasIssue =
VAR issuesthisID =
CALCULATE (
COUNTROWS ( Issues ),
ALLEXCEPT ( Issues, Issues[ ID] ),
Issues[Issue] = 1
)
RETURN
IF ( issuesthisID >= 1, 1, 0 )

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Greg_Deckler
Community Champion
Community Champion

@jpat1234 - So what are we looking at? Is that your expected output? If so, what does the source data look like?

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



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...

1) for catagory 104 in my table - want to change row level data on issues column

2) for catagory 104 ,  if one row has issue or follow up then all rows for should be displayed as issue/followup for same id. 

3) all other data remains the same. 

 

My data        
 IDcategoryanswerfollowupskippedgoodFupSkipIssue
200510490000000FalseFalse1   
200510490000000FalseFalse1   
200510490000000FalseFalse1   
200510480000001FalseFalse   1
20055680000001TrueFalse 1  
200612380000001FALSEFalse   1
200612390000000FalseFalse1   
         
Expected data (want to change the way issue column looks in the data table) 
         
 IDcategoryanswerfollowupskippedgoodFupSkipIssue
         
200510490000000FalseFalse   1
200510490000000FalseFalse   1
200510490000000FalseFalse   1
200510480000001FalseFalse   1
20055680000001TrueFalse 1  
200612380000001FALSEFalse   1
200612390000000FalseFalse1   

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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