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,
I would like one help to calcualte average of Health% column as you can see above. Health% column is Measure i have created based on logic. I need to calcualte Average of Health% in CUSTOMER EXPERIANCE box where currently result is INFINITY. The result should be 93.37% instead of Infinity if you sum of Health% values divide by 3 because there are 3 KPI.
In future, KPI will increase for sure so looking for dynamic solution if there will be 5 KPI then SUM of Health% should be divide by 5. And So on.
I tried by below formula:
Measure = DIVIDE (Health%, No of KPI)
WHere No of KPI = COunt (KPI Name) but its not working.
Any help would be appreciated!
Thanks
Solved! Go to Solution.
So, what you want to do is to create a table variable that is the same as your visual displayed and then do an AVERAGEX across it. So let's say that you have a table with exactly the columns you have in your visual minus your measure, you would do this:
Average of Measure =
VAR __Table =
ADDCOLUMNS(
'Table',
"__Health %",[Health %]
)
RETURN
AVERAGEX(__Table,[__Health %])
So, what you want to do is to create a table variable that is the same as your visual displayed and then do an AVERAGEX across it. So let's say that you have a table with exactly the columns you have in your visual minus your measure, you would do this:
Average of Measure =
VAR __Table =
ADDCOLUMNS(
'Table',
"__Health %",[Health %]
)
RETURN
AVERAGEX(__Table,[__Health %])
Awesome that worked like charm.
Thank you so much.
Thanks
Hi,
Do any of these work?
No of KPI = Counta(KPI Name)
No of KPI = DISTINCTCOUNT(KPI Name)
If not, then share the link from where i can download your PBI file.
Hi,
Thank you for your response.
Unfortunately, i wont be able to send you PBIX file due to data privacy. However, none of count work.
Is there any other work around to get what i am looking for?
Thanks
Hi,
Try this
=IF(HASONEVALUE(Data[KPI]),[Health%],AVERAGEX(SUMMARIZE(VALUES(Data[KPI]),Data[KPI],"Avg",[Health%]),[Avg]))
Hope this helps.
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 |
---|---|
110 | |
97 | |
77 | |
63 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |