Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
Hi, the following formula should calculate the sum of LN(ArbeitszeitInH) if Produkt_Nr=2006.301 and so on..
Ampel301. = IF(KontElemente[Produkt_Nr]=2006301;CALCULATE(SUM('LN'[ArbeitszeitInH]));CALCULATE(SUM('LN'[Summe_Arbeits&Reisezeit])))
The Produkt-Nr ist formatted as text. It won´t work, but I´ve no clue why..
Cheers,
Felix
Solved! Go to Solution.
Hi @BachFel,
If the Produkt-Nr is formatted as text you need to change your formula to:
Ampel301. =
IF (
KontElemente[Produkt_Nr] = "2006.301";
CALCULATE ( SUM ( 'LN'[ArbeitszeitInH] ) );
CALCULATE ( SUM ( 'LN'[Summe_Arbeits&Reisezeit] ) )
)If you don't place the ampersand it will be recognized as number since your column is a text the result will not be as you need.
Regards
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @BachFel,
If the Produkt-Nr is formatted as text you need to change your formula to:
Ampel301. =
IF (
KontElemente[Produkt_Nr] = "2006.301";
CALCULATE ( SUM ( 'LN'[ArbeitszeitInH] ) );
CALCULATE ( SUM ( 'LN'[Summe_Arbeits&Reisezeit] ) )
)If you don't place the ampersand it will be recognized as number since your column is a text the result will not be as you need.
Regards
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsVote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 56 | |
| 52 | |
| 45 | |
| 17 | |
| 16 |
| User | Count |
|---|---|
| 108 | |
| 108 | |
| 39 | |
| 33 | |
| 25 |