Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

DAX - How to Count Rows of a table column which has some visualization filter

Dear Experts,

 

I have no access to Modelling tab, only access for BI report & I wonder how can i count each rows in below table which has been filtered (visualization filter). 

>> I need to count number of row of Location No, for below Inventory table. 

>> Result required is another column beside Date, with count 1 for each rows.

>> and obviously the total count. 

>> *Each of the column has filter which is a selected filter outside the visual table (for user to selected in the dashboard).   

 

Let me know if you have any idea for the DAX measure. Thanks in advance. 

  • Hi Anonymous

    I make a test with data from two tables

    each row = COUNT(sheet1[nno])
    
    distinctcount = DISTINCTCOUNT(sheet1[nno])
    
    

    Best Regards

    Maggie

9 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous

    I make a test with data from two tables

    each row = COUNT(sheet1[nno])
    
    distinctcount = DISTINCTCOUNT(sheet1[nno])
    
    

    Best Regards

    Maggie

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Icon for Community Champion rankCommunity Champion

    Anonymous

     

    Try somehting like this

     

    Measure =
    COUNTROWS ( SUMMARIZE ( Table1, Table[Col1], Table[Col2] ,.....Other columns in the table visual) )
    
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Zubair,

       

      Thanks for your advice, but the column are from multiple tables, but each has a relation.

      How can we write the DAX formula, if it is from different tables?

      • Zubair_Muhammad's avatar
        Zubair_Muhammad
        Icon for Community Champion rankCommunity Champion

        Hi Anonymous

         

        Start with the Many side Table.......

         

        Then Summarize will allow you to add column from the one side table