Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
Pessoal, tenho a modelagem acima.
Preciso fazer a contagem da quantidade de registros em "tb_BaseDados" e tenho a seguinte medida
O problema é que ao inserir a segunda restrição, dá erro: "Um único valor para a coluna 'Conteudo' na tabela 'tb_Conteudo' não pode ser determinado.
Solved! Go to Solution.
Hi @educrocha_agu,
Not sure how you create relationships for the tables in your model. But you may try this Measure.
RecordsSIM =
VAR res =
CALCULATE (
COUNT ( 'tb_BaseDados'[pk] ),
FILTER (
'tb_BaseDados',
'tb_BaseDados'[dtRelatorio] >= DATEVALUE ( "01/05/2021" )
&& MAX ( 'tb_Conteudo'[Conteudo] ) = "SIM"
)
)
RETURN
res
RecordsSIM with proper total =
VAR midT =
ADDCOLUMNS ( VALUES ( tb_BaseDados[pk] ), "val", [RecordsSIM] )
RETURN
SUMX ( midT, [val] )
Then, the result looks like this.
Also, attach the pbix as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Hi @educrocha_agu,
Not sure how you create relationships for the tables in your model. But you may try this Measure.
RecordsSIM =
VAR res =
CALCULATE (
COUNT ( 'tb_BaseDados'[pk] ),
FILTER (
'tb_BaseDados',
'tb_BaseDados'[dtRelatorio] >= DATEVALUE ( "01/05/2021" )
&& MAX ( 'tb_Conteudo'[Conteudo] ) = "SIM"
)
)
RETURN
res
RecordsSIM with proper total =
VAR midT =
ADDCOLUMNS ( VALUES ( tb_BaseDados[pk] ), "val", [RecordsSIM] )
RETURN
SUMX ( midT, [val] )
Then, the result looks like this.
Also, attach the pbix as reference.
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please let me know how. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 3 | |
| 2 | |
| 2 | |
| 1 | |
| 1 |
| User | Count |
|---|---|
| 6 | |
| 4 | |
| 3 | |
| 3 | |
| 3 |