Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Measure filters

Hi everyone, 

 

I'm new with this account because I work at a different company now. I have some experience with Power BI. 

I made a card with filters which gives me an outcome. I want to calculate with that outcome so I can calculate some percentages. Now I was thinking of making a measure with a sum and a filter. But it isn't working. So I'm doing something wrong. I think it's because of the amount of filters. Also I get the message that I'm not allowed to compare true/false with text. 

Anybody has an idea how I can go through with this?

 
afname aantal =
CALCULATE(
SUM('table'[amount]),
FILTER('table','table'[CallType]="AFNAME" & 'table'[Productcheck]="1" & 'table'[UnitCheck]="1" & 'table'[status_contreader]="Actief" || "Leegstand" & 'table'[STATUS]<>"Geannulr" ||"Gennul" & table'[status_line]="Actief" ||"Leegstand"))

3 Replies

  • Anonymous , I doubt the calculation, Correct the syntax at few places. Try

    afname aantal =
    CALCULATE(
    SUM('table'[amount]),
    FILTER('table','table'[CallType]="AFNAME" && 'table'[Productcheck]="1" && 'table'[UnitCheck]="1"
    && 'table'[status_contreader] in {"Actief" ,"Leegstand"} && not('table'[STATUS] in {"Geannulr" ,"Gennul"}) && 'table'[status_line] in {"Actief" ,"Leegstand" }))

    • Anonymous's avatar
      Anonymous
      Not applicable

      amitchandak  sorry for the late reply, I have a seperate 365 account on which I don't receive email, only for power BI, so I didnt see your response. Unfortunately it didnt work, I get the same error. I'm going to look into it some more myself. Maybe I can do it some other way.