Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
I'm trying to create a DAX measure that calculates reliability, but I’m encountering an issue. The goal is to make the measure work when one or more equipment items are selected. However, when no equipment filter is applied, it throws an error in the graph. I need help adapting the formula to handle this case properly.
Here’s the original code:
Now, I’m trying to adapt the formula to handle both cases — when equipment is filtered and when no filter is applied:
Confiabilidade_Sistema =
However, it returns the following error: "The ADDCOLUMNS function expected a table expression for the '' argument, but a string or numeric expression was used."
The issue arises when no equipment is selected. If any equipment is selected, the graph works fine. Could you help me fix this issue?
Solved! Go to Solution.
Hi,
Can you try CALCULATETABLE instead of FILTER ?
VAR Equipamentos =
IF(
ISFILTERED(TTF[Equipamento Corrigido]),
VALUES(TTF[Equipamento Corrigido]),
CALCULATEDTABLE(
VALUES(TTF[Equipamento Corrigido]),
NOT(ISBLANK(TTF[a_eq]))
)
)
Hi @Janchieta , Please try the below updated measure:
Confiabilidade_Sistema =
VAR t = SELECTEDVALUE(Tabela_TTF[TTF]) -- Time to failure (in hours)
VAR Equipamentos =
IF(
ISFILTERED(TTF[Equipamento Corrigido]),
VALUES(TTF[Equipamento Corrigido]),
FILTER(
ALL(TTF[Equipamento Corrigido]),
NOT(ISBLANK(CALCULATE([a_eq])))
)
)
VAR Confiabilidades =
ADDCOLUMNS(
Equipamentos,
"Confiabilidade",
VAR Beta = CALCULATE([b_eq], TTF[Equipamento Corrigido] = EARLIER(TTF[Equipamento Corrigido]))
VAR Eta = CALCULATE(EXP(-[a_eq] / Beta), TTF[Equipamento Corrigido] = EARLIER(TTF[Equipamento Corrigido]))
RETURN IF(NOT(ISBLANK(Beta)) && NOT(ISBLANK(Eta)), EXP(-POWER(t / Eta, Beta)), 1)
)
RETURN
IF(
ISBLANK(t),
BLANK(), -- Handles cases where TTF is not available
1 - PRODUCTX(Confiabilidades, 1 - [Confiabilidade]) -- Calculates system reliability
)
Hi @Janchieta , Please try the below updated measure:
Confiabilidade_Sistema =
VAR t = SELECTEDVALUE(Tabela_TTF[TTF]) -- Time to failure (in hours)
VAR Equipamentos =
IF(
ISFILTERED(TTF[Equipamento Corrigido]),
VALUES(TTF[Equipamento Corrigido]),
FILTER(
ALL(TTF[Equipamento Corrigido]),
NOT(ISBLANK(CALCULATE([a_eq])))
)
)
VAR Confiabilidades =
ADDCOLUMNS(
Equipamentos,
"Confiabilidade",
VAR Beta = CALCULATE([b_eq], TTF[Equipamento Corrigido] = EARLIER(TTF[Equipamento Corrigido]))
VAR Eta = CALCULATE(EXP(-[a_eq] / Beta), TTF[Equipamento Corrigido] = EARLIER(TTF[Equipamento Corrigido]))
RETURN IF(NOT(ISBLANK(Beta)) && NOT(ISBLANK(Eta)), EXP(-POWER(t / Eta, Beta)), 1)
)
RETURN
IF(
ISBLANK(t),
BLANK(), -- Handles cases where TTF is not available
1 - PRODUCTX(Confiabilidades, 1 - [Confiabilidade]) -- Calculates system reliability
)
Hi,
Can you try CALCULATETABLE instead of FILTER ?
VAR Equipamentos =
IF(
ISFILTERED(TTF[Equipamento Corrigido]),
VALUES(TTF[Equipamento Corrigido]),
CALCULATEDTABLE(
VALUES(TTF[Equipamento Corrigido]),
NOT(ISBLANK(TTF[a_eq]))
)
)
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 3 | |
| 3 | |
| 3 |