The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
Is tehere a way how to convert returned value from if statement into number?
In IMG (Column 2G_5RDC-TA) is visible that power bi does not sum returned value and treat them as string.
My formula is:
Solved! Go to Solution.
Hi @Anonymous ,
Please try the following formula:
2G_5RDC-TA =
SUMX (
SUMMARIZE (
Load_data_merged,
Load_data_merged[Load number],
"result",
IF (
"5RDC" IN VALUES ( Load_data_merged[Sufix_template.FDP] ),
IF ( "TA" IN VALUES ( Load_data_merged[Sufix_template.FDP] ), 1, "" )
)
),
[result]
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Please try the following formula:
2G_5RDC-TA =
SUMX (
SUMMARIZE (
Load_data_merged,
Load_data_merged[Load number],
"result",
IF (
"5RDC" IN VALUES ( Load_data_merged[Sufix_template.FDP] ),
IF ( "TA" IN VALUES ( Load_data_merged[Sufix_template.FDP] ), 1, "" )
)
),
[result]
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks a million
Hi @Anonymous
It's a total issue, very common. See this link to find out why it's wrong and how to fix it:
https://www.vahiddm.com/post/why-my-measure-returns-the-wrong-total
You can change "" to blank() in your formula.
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi,
If you are referring to the total column the problem is not actually with aggregation. Total row uses the same logic as the column it counts the total from so in this case your total row tests what this dax returns:
Proud to be a Super User!
Thank you ValtteriN,
Unfortunately this workaround does not helped me.
Yes, you are right. I am referncing to total. In your solution is refrence to loadnumber. Hovewer this field is never empty.
User | Count |
---|---|
28 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |