Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Power BI Dax function

Hi 

 

I need help for Dax function .I need to count false and ture value From column.Please refer below image.

 

Column name discontiuned how many true and false discontiuned count.

 

Thanks In advance.

 

  • Hi Anonymous, 

     

    You can create measures below: 

     

    CountTrue = CALCULATE(COUNTA('Table'[discontiuned]),FILTER(ALLSELECTED('Table'),'Table'[discontiuned]=TRUE()))

     

    CountFalse = CALCULATE(COUNTA('Table'[discontiuned]),FILTER(ALLSELECTED('Table'),'Table'[discontiuned]=FALSE()))

     

     

    Best Regards,
    Qiuyun Yu

1 Reply

  • v-qiuyu-msft's avatar
    v-qiuyu-msft
    Community Support

    Hi Anonymous, 

     

    You can create measures below: 

     

    CountTrue = CALCULATE(COUNTA('Table'[discontiuned]),FILTER(ALLSELECTED('Table'),'Table'[discontiuned]=TRUE()))

     

    CountFalse = CALCULATE(COUNTA('Table'[discontiuned]),FILTER(ALLSELECTED('Table'),'Table'[discontiuned]=FALSE()))

     

     

    Best Regards,
    Qiuyun Yu