Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 48 | |
| 43 | |
| 39 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 63 | |
| 31 | |
| 30 | |
| 23 |