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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
ErikBI
Resolver I
Resolver I

Trying to create a column that return true/false if the total of a project >= 10.

Hello guys,

 

I'm trying to create something but I can't figure out how to do this with DAX.

Basically I have a list of projects with certain amounts. Projects may be (and mostly are) in this list more than once. 

 

I am trying to create a column that return true or false depending in wether the amount per project is higher or lower than 10. 

See example image below:

ErikBI_1-1645022181456.png

 

in this example the total amount for project B and C is more than 10. These are "TRUE". project A and D are in total lower than 10, hence "FALSE".

 

Does anyone know how to create a dax calculated comlumn like this?

I have previously solved this solution with a sumarized table but I'd rather not stick to that solution since I don't want to add more tables to the model. 

 

Sincerely,

Erik

 

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
Community Champion

Hi @ErikBI ,

 

You can create a column like this:-

Column = 
var result = CALCULATE(SUM('Table (6)'[amount]),FILTER('Table (6)','Table (6)'[Project ] = EARLIER('Table (6)'[Project ])))
return if(result >= 10,TRUE(),FALSE())

Output:-

Samarth_18_0-1645023311676.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

3 REPLIES 3
ErikBI
Resolver I
Resolver I

@Samarth_18 @amitchandak both of your solutions worked great. Thanks!

Samarth_18
Community Champion
Community Champion

Hi @ErikBI ,

 

You can create a column like this:-

Column = 
var result = CALCULATE(SUM('Table (6)'[amount]),FILTER('Table (6)','Table (6)'[Project ] = EARLIER('Table (6)'[Project ])))
return if(result >= 10,TRUE(),FALSE())

Output:-

Samarth_18_0-1645023311676.png

 

Thanks,

Samarth

 

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

amitchandak
Super User
Super User

@ErikBI , A new column

if(sumX(filter(Table, [project] =earlier([Project]) ),[Amount]) >10, TRUE(), FALSE() )

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.