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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
bidav
Frequent Visitor

new column based on values in rows (direct query)

hi guys

i am trying to create a new column, named "startedyn" that will display "STARTED" on all the rows within the same "docentry" number, if one of the rows has "1" value in the "start_no" column. in my screenshot, not all the "start_no" values have 1. one of them has 0, but still the new column should display started on all the rows within the same docentry number. The dataset is direct query so i can't use something like startedyn = if (CALCULATE( MAX(Table[start_no]) ,ALLEXCEPT(Table,Table[docentry] )) > 0, "STARTED")

j7OPQq (1).png

thank you! and sorry for the noob question. new to power bi!

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @bidav 

 

You can try the following methods.

Column:

startedyn = IF(CALCULATE(MIN('Table'[start_no]),ALLEXCEPT('Table','Table'[docentry]))>0,"started")

vzhangti_0-1658124158424.png

The formula for Measure is the same as the formula for calculating columns.

 

Best Regards,

Community Support Team _Charlotte

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

 

bidav
Frequent Visitor

any idea i can use guys?

amitchandak
Super User
Super User

@bidav , I doubt you can create a column like that in direct query, you should create a measure

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, thank you for your reply.

how can i create a measure that will modify the column mentioned with "started" isn't measure is just a single number?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors