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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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