The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event! Join us in Stockholm, Sweden from September 24-27, 2024.
2-for-1 sale on June 20 only!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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:
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
Solved! Go to Solution.
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:-
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
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:-
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
@ErikBI , A new column
if(sumX(filter(Table, [project] =earlier([Project]) ),[Amount]) >10, TRUE(), FALSE() )
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
62 | |
57 |
User | Count |
---|---|
246 | |
119 | |
114 | |
86 | |
70 |