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.
Hi PB buddy,
I would like to have a measure as such result, would anyone help, thanks
count column A where sum of column B is not 0, the outcome should be 2
Many thanks
Solved! Go to Solution.
Hi,
These measures work
Measure = COUNTROWS(FILTER(SUMMARIZE(VALUES(Data[Customer]),Data[Customer],"ABCD",CALCULATE([Total],Data[Code]=1)),[ABCD]<>0))
Measure 2 = COUNTROWS(FILTER(SUMMARIZE(VALUES(Data[Customer]),Data[Customer],"ABCD",CALCULATE([Total],Data[Code]=1),"EFGH",CALCULATE([Total],Data[Code]=2)),[ABCD]<>0&&[EFGH]<>0))
Hi @Anonymous ,
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Cheers,
Rob
Hi @Anonymous , thanks for your reply, pardon English is not my primary language, I've already searched previous post but can't get a right answer, I've made my question as simple as possible as well.
Hi @Anonymous ,
No problem.
1. Please share sample data via copy/paste (no picture) or share .pbix file.
2. Please share what is your expected result from sample data.
Cheers,
Rob
Thanks @Anonymous
1. Please find the sample data below
Customer | Amount | Code |
A0001 | 100 | 01 |
A0001 | -100 | 01 |
A0002 | 100 | 01 |
A0002 | 100 | 01 |
A0002 | 0 | 02 |
A0002 | 0 | 02 |
A0003 | 100 | 01 |
A0003 | 100 | 01 |
A0003 | 200 | 02 |
A0003 | 200 | 02 |
A0004 | 200 | 02 |
A0004 | 200 | 02 |
2. now I would like 2 measures which
measure 1 = count no. of customer where code = "01" and sum of amount <> 0
desired result = 2 (A0002, A0003)
measure 2 = count no. of customer where (code = "01" and sum of amount <> 0) and (code = "02" and sum of amount <> 0)
desired result = 1 (A0003)
Many thanks in advance
Simon
Hi,
These measures work
Measure = COUNTROWS(FILTER(SUMMARIZE(VALUES(Data[Customer]),Data[Customer],"ABCD",CALCULATE([Total],Data[Code]=1)),[ABCD]<>0))
Measure 2 = COUNTROWS(FILTER(SUMMARIZE(VALUES(Data[Customer]),Data[Customer],"ABCD",CALCULATE([Total],Data[Code]=1),"EFGH",CALCULATE([Total],Data[Code]=2)),[ABCD]<>0&&[EFGH]<>0))
Great thanks bro! It's help a lot!
You are welcome.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
117 | |
107 | |
69 | |
68 | |
43 |
User | Count |
---|---|
148 | |
104 | |
102 | |
88 | |
66 |