Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreThe FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now
Hello,
I created this calculated column. I have a problem because the sign of the second IF impacts the sign of the 3rd IF. I tried to work around by storing the second IF in a variable but nothing worked. How can I avoid that the sign of the second IF does not impact the 3rd.
When I change the sign of the second if, it also changes the sign of the last if...
New =
IF ('Table'[Step] = "Ouverture", CALCULATE([T (n-1) cumul], 'repository'[category] = "1 - Net ", 'Table'[Code]= "IFRS new"),
IF ('Table'[Step] <> "", -CALCULATE([T cumul], 'repository'[category] = "2 - Total", 'Table[Code] = "new"),
IF ('Table'[Step] <> "", CALCULATE([T cumul], 'repository'[category] = "3 - Cash Flows", 'Table'[Code] = "IFRS new") ) ) )
Can you share a screenshot and describe the business logic? I think I have not yet understood what you would like to achieve 🙂
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
When I add the - in front of the 2nd IF, it shows me the correct results in my table, but it affects the sign of my 3rd IF. This turns my result into a negative for me, when I want it to be positive.
Between the 2- and the 3-, some lines share common accounts, I don't know if this can be the cause
Hi @Power_BI_new ,
The if function works like this:
if ( Condition = TRUE, Result, AlternativeResult )
--> "if condition is true, return Resultl, else return AlternativResult"
In your case, I'd suggest this one here:
New =
IF ('Table'[Step] = "Ouverture", CALCULATE([T (n-1) cumul], 'repository'[category] = "1 - Net ", 'Table'[Code]= "IFRS new"),
IF ('Table'[Step] <> "", -CALCULATE([T cumul], 'repository'[category] = "2 - Total", 'Table[Code] = "new"),
CALCULATE([T cumul], 'repository'[category] = "3 - Cash Flows", 'Table'[Code] = "IFRS new") ) )
Does this work?
/Tom
https://www.tackytech.blog/
https://www.instagram.com/tackytechtom/
| Did I answer your question❓➡️ Please, mark my post as a solution ✔️ |
| Also happily accepting Kudos 🙂 |
| Feel free to connect with me on LinkedIn! | |
| #proudtobeasuperuser | |
Thanks for your answer but it doesn't work. I can't change the sign of the 3rd IF, I tried to put an ABS() but my number remains negative as if I hadn't put anything.
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 | |
| 44 | |
| 44 | |
| 19 | |
| 19 |
| User | Count |
|---|---|
| 72 | |
| 70 | |
| 34 | |
| 33 | |
| 31 |