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 Team,
Could you please help me with creating a measure?
I need to Calculate the Average for (No group) ignoring zeros. The values for the second column are based on another measure [Count Month]. So I need to ignore zeros but to leave them in the matrix.
Average CountMonths =
AVERAGEX(VALUES(Table1[id]),[Count Months])
My matrix with the current calculation
Desired output to have 2 for "No group", but 0 should stay where they are
Many thanks for you help!
Solved! Go to Solution.
Hi @yakovlol ,
I suggest you to create a new [Average CountMonths] table based on original one.
New Average CountMonths =
AVERAGEX(FILTER(VALUES(Table1[id]),[Average CountMonths]<>0),[Average CountMonths])+0
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello @mlsx4
Many thanks for your help, but when I'm using this measure I have 1.00 everywhere, actually don't know why.
But for id 5 and 7 I need to have 3.00 like in picture above
Hi @yakovlol ,
I suggest you to create a new [Average CountMonths] table based on original one.
New Average CountMonths =
AVERAGEX(FILTER(VALUES(Table1[id]),[Average CountMonths]<>0),[Average CountMonths])+0
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
77 | |
76 | |
36 | |
31 | |
29 |
User | Count |
---|---|
93 | |
79 | |
57 | |
48 | |
48 |