The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I am new to DAX and am looking to create a measure that shows the sum of the weight which is not being recycled.
I believe this is how its done below but nothing is returning, calculate the sum but filter out "Other" (which is what is not being recycled).
Here is what I thought:
Non-Recyclable Waste = CALCULATE(SUM('Sims Waste Certificates'[Waste Weight (Ton)]),FILTER('Sims Waste Certificates',[Waste Type] = "Other"))
All help is appreciated! Thanks!
Solved! Go to Solution.
@LewisFoulger Based on datasnapshot you shared. Can you convert your measure to decimal number like below. Since your data for other is in few pointers only.
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
I am looking to pull the total waste weight ton (ton) where waste type = Other
Hi @LewisFoulger ,
The thing which you put in filter condition is case sensitive so please make sure you have write "Other" correctly(with proper case) and you can try below code:-
Non-Recyclable Waste = CALCULATE(SUM('Sims Waste Certificates'[Waste Weight (Ton)]),'Sims Waste Certificates'[Waste Type] = "Other")
or
Non-Recyclable Waste = CALCULATE(SUM('Sims Waste Certificates'[Waste Weight (Ton)]),FILTER(all('Sims Waste Certificates'[Waste Type]),Sims Waste Certificates[Waste Type] = "Other"))
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 Samarth_18,
I tried both and it returns "1". What I am looking for is to return the total weight of every item labelled "Other", maybe I am doing something completely different?
@LewisFoulger Based on datasnapshot you shared. Can you convert your measure to decimal number like below. Since your data for other is in few pointers only.
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
User | Count |
---|---|
11 | |
9 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
14 | |
14 | |
9 | |
7 |