The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi all
I created a simple dax measure that sums cell values and divides all of them by 70.
I am getting results with over 100% which make no sense. I made sure I selected dont summarize so it wouldnt affect but still cant get it right.
Dax is:
Q/FS Total DAX =
var _ingredients =
(
SUM('Suppliers Compliance'[Audit Score (25%)]) +
SUM('Suppliers Compliance'[CAP Score (5%)]) +
SUM('Suppliers Compliance'[QF Score (20% Ing/ 30% pack)]) +
SUM('Suppliers Compliance'[Score Threats (10%)]) +
SUM('Suppliers Compliance'[Score Analysis (10%)])
)
/
70
var _package =
(
SUM('Suppliers Compliance'[Audit Score (25%)]) +
SUM('Suppliers Compliance'[CAP Score (5%)]) +
SUM('Suppliers Compliance'[QF Score (20% Ing/ 30% pack)]) +
SUM('Suppliers Compliance'[Score Threats (10%)])
)
/
70
return
IF(SELECTEDVALUE ('Suppliers Compliance'[Type]) = "Ingredients" , _ingredients , _package)
Some values over 100% are
I attach pbix
https://1drv.ms/u/s!ApgeWwGTKtFdhjK8-nxxMvBkrAEq?e=BltJtf
Thanks for the help!
Solved! Go to Solution.
Hi @o59393 ,
I have checked your PBI file, that's because you have duplicated values for some IDs, so you can't only use SUM to calculate the KPI.
Please try to use below measure to instead of:
Q/FS Total DAX =
var _ingredients =
(
SUM('Suppliers Compliance'[Audit Score (25%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[CAP Score (5%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[QF Score (20% Ing/ 30% pack)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[Score Threats (10%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[Score Analysis (10%)])/ COUNT('Suppliers Compliance'[Id])
)
/
70
var _package =
(
SUM('Suppliers Compliance'[Audit Score (25%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[CAP Score (5%)]) / COUNT('Suppliers Compliance'[Id])+
SUM('Suppliers Compliance'[QF Score (20% Ing/ 30% pack)]) / COUNT('Suppliers Compliance'[Id])+
SUM('Suppliers Compliance'[Score Threats (10%)])/ COUNT('Suppliers Compliance'[Id])
)
/
70
return
IF(SELECTEDVALUE ('Suppliers Compliance'[Type]) = "Ingredients" , _ingredients , _package)
Aiolos Zhao
Proud to be a Super User!
@o59393 , hope above solution has resolved you issue
Hi @amitchandak and @AiolosZhao
Apologies for my delay, it worked perfectly.
Appreciate your time and help.
Have a nice weekend!
Hi @o59393 ,
I have checked your PBI file, that's because you have duplicated values for some IDs, so you can't only use SUM to calculate the KPI.
Please try to use below measure to instead of:
Q/FS Total DAX =
var _ingredients =
(
SUM('Suppliers Compliance'[Audit Score (25%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[CAP Score (5%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[QF Score (20% Ing/ 30% pack)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[Score Threats (10%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[Score Analysis (10%)])/ COUNT('Suppliers Compliance'[Id])
)
/
70
var _package =
(
SUM('Suppliers Compliance'[Audit Score (25%)])/ COUNT('Suppliers Compliance'[Id]) +
SUM('Suppliers Compliance'[CAP Score (5%)]) / COUNT('Suppliers Compliance'[Id])+
SUM('Suppliers Compliance'[QF Score (20% Ing/ 30% pack)]) / COUNT('Suppliers Compliance'[Id])+
SUM('Suppliers Compliance'[Score Threats (10%)])/ COUNT('Suppliers Compliance'[Id])
)
/
70
return
IF(SELECTEDVALUE ('Suppliers Compliance'[Type]) = "Ingredients" , _ingredients , _package)
Aiolos Zhao
Proud to be a Super User!
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
80 | |
73 | |
52 | |
50 |
User | Count |
---|---|
129 | |
123 | |
78 | |
64 | |
60 |