Forum Discussion
Power bi
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
depois de muitas tentativas eu consegui.🙏
- lbendlin2 years ago
Super User
What do you expect
CALCULATE( VALUES('RECUPERAÇÕES'[RECUPERADO]),to return?
- Edivaldonovais2 years agoRegular Visitor
Olá, eu esperava retornar com o valor de recuperado na tablea confome foto abaixo, más já consegui usando o código abaixo:
Recuperado =SE (MÁXX (FILTRO (notas ,notas [nota] = ANTERIOR ( notas [nota] )),notas [dados do custo]) = notas [dados do custo] ,CALCULAR (VALORES ( 'RECUPERAÇÕES' [RECUPERADO] ),FILTRO ('RECUPERAÇÕES' ,'RECUPERAÇÕES' [NOTA] = EARLIER ( notas [nota] ))),0)- lbendlin2 years ago
Super User
CALCULATE(VALUES(x)) only works (in a quirky way) when x is a list with a single element. You should use other DAX code that is more resilient.