Forum Discussion

Ramendra's avatar
Ramendra
Helper IV
6 years ago
Solved

formula context

Hi Team,

Can you please help me to know that how to apply below formula in Power Bi for a table

Countif(K4:Q29,"<=6")

  • Hi Ramendra ,

     

    Add an index column in the query editor.

    Select the index column and unpivoted other column.

    Extract the number after "U".

    Converts your selected range to a filter condition in DAX.

    Sample .pbix

     

    Best Regards,
    Liang
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

6 Replies

    • Ramendra's avatar
      Ramendra
      Helper IV

      Anonymous ,

       

      No this is for a range including more than one column.

      Can you suggest for this.

      • V-lianl-msft's avatar
        V-lianl-msft
        Community Support

        Hi Ramendra ,

         

        Add an index column in the query editor.

        Select the index column and unpivoted other column.

        Extract the number after "U".

        Converts your selected range to a filter condition in DAX.

        Sample .pbix

         

        Best Regards,
        Liang
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Ramendra , if it is one column you can do like

    countX(filter(Table,Table[col] <=6),Table[Col])

     

    else Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • Ramendra's avatar
      Ramendra
      Helper IV

      amitchandak , no this is not for a single column.

      This is a range of columns in a table.

      Can you please suggest for this.