Forum Discussion
calculate syntax
Hi Team,
Can some one help me to know for below syntax in Power BI measure
Count column A values if column B contains value=XYZ and if column c contains value= ABC or PQR
Just add a NOT to that part:
Measure = CALCULATE(COUNT(Table1[ColA]), Table1[ColB] ="XYZ", NOT Table1[ColC] IN {"ABC", "PCR"} )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
6 Replies
- AlBCommunity Champion
Hi Ramendra
Measure = CALCULATE(COUNT(Table1[ColA]), Table1[ColB] ="XYZ", Table1[ColC] IN {"ABC", "PCR"} )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- AlBCommunity Champion
Just add a NOT to that part:
Measure = CALCULATE(COUNT(Table1[ColA]), Table1[ColB] ="XYZ", NOT Table1[ColC] IN {"ABC", "PCR"} )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
- amitchandakSuper User
Ramendra , Try like
calculate(count(Table[ColumnA]), filter(Table, Table[column B] ="XYZ" && Table[column B] in {"ABC","PQR"}))
- v-xuding-msftCommunity Support
Hi Ramendra ,
Are the answer helpful for you? If yes, please kindly accept as solution. If you still need help, please share some sample data with us. Thanks.