Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have below table, I want to create a new column that shows the default integration for the ID. i.e NewColumn below
If the there is Default_Flag = 1 for then use the Integration value from that row and fill the Newcolumn with that value in all rows for that ID
i.e for ID 001 first row has the default_Flag = 1 so will use value "A" from integrations column and fill in NewColumn for all the rows for 001 with "A"
ID 003 doesnt have any rows with default_Flag = 1 so will fill NewColumn as "No Default"
How do I do it?
ID | Integration | Default_Flag | NewColumn |
001 | A | 1 | A |
001 | C | 0 | A |
001 | B | 0 | A |
002 | B | 1 | B |
002 | D | 0 | B |
003 | A | 0 | No Default |
003 | B | 0 | No Default |
Thanks
Solved! Go to Solution.
Excel worksheet formula is enough
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi @Anonymous
Here is a quick calcualted column that will give you what you're after!
Calculated Column =
VAR _1 = MAXX ( FILTER ( 'Table' , 'Table'[ID] = EARLIER ('Table'[ID] ) && 'Table'[Default Flag] = "1" ) , 'Table'[Integration] )
RETURN
IF ( ISBLANK ( _1 ) , "No Default" , _1 )
Output is as per below:
Hope this helps!
Theo 🙂
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Excel worksheet formula is enough
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@Anonymous Not sure I quite follow the rules on how to arrive at the values.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
67 | |
51 | |
38 | |
26 |
User | Count |
---|---|
87 | |
54 | |
45 | |
40 | |
36 |