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
Hello,
I have a problem regarding my formula in an array. When I am on my Chartre de Bretagnes site, my calculation works perfectly. Unfortunately, when I change the Vannes example site, it seems that the formula does not agree with the total.
La formule est la suivante:
Bennes manquantes 2 = if([stock dispo2]-SUM('Table (2)'[Stock pour dev Co])>=0,0,[stock dispo2]-SUM('Table (2)'[Stock pour dev Co]))
Thank you for your help
Solved! Go to Solution.
@Elie_HUCHET , You have use visual column to rebuild total
Bennes manquantes 2 = Sumx(values(Table (2)[Column]) , if([stock dispo2]-SUM('Table (2)'[Stock pour dev Co])>=0,0,[stock dispo2]-SUM('Table (2)'[Stock pour dev Co])) )
or refer this video
https://www.youtube.com/watch?v=ufHOOLdi_jk
Hi @Elie_HUCHET ,
IF function will return values based on true or false, so you won't get total as you want. amitchandak 's reply should be a workaround, you need to use keycolumn in your visual to calculate the sum based on [Bennes manquantes 2] measure instead of the measure code.
Measure with correct subtotal = SUMX(VALUES('TableName'[Keycolumn]),[Bennes manquantes 2])
The calculation is based on your data model. If this reply still couldn'y help you solve your problem, please share a sample file with me and show me a screenshot with the result you want.
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.
Thank you for your reply I found a solution!! 🙂
Hello, thank you for your answer but it doesn't work. Have you got on other idea?
Hi @Elie_HUCHET ,
IF function will return values based on true or false, so you won't get total as you want. amitchandak 's reply should be a workaround, you need to use keycolumn in your visual to calculate the sum based on [Bennes manquantes 2] measure instead of the measure code.
Measure with correct subtotal = SUMX(VALUES('TableName'[Keycolumn]),[Bennes manquantes 2])
The calculation is based on your data model. If this reply still couldn'y help you solve your problem, please share a sample file with me and show me a screenshot with the result you want.
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.
@Elie_HUCHET , You have use visual column to rebuild total
Bennes manquantes 2 = Sumx(values(Table (2)[Column]) , if([stock dispo2]-SUM('Table (2)'[Stock pour dev Co])>=0,0,[stock dispo2]-SUM('Table (2)'[Stock pour dev Co])) )
or refer this video
https://www.youtube.com/watch?v=ufHOOLdi_jk
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 |
---|---|
21 | |
19 | |
18 | |
18 | |
14 |
User | Count |
---|---|
36 | |
35 | |
20 | |
20 | |
17 |