Create a measure to count values in a particular column

Learner DAX 41 Reputation points
2020-12-03T19:39:35.403+00:00

Hi
I am migrating a report from SAP BO to Power BI. One of the measure is used there is like below
=Count([ColumnA]) Where ([Table].[ColumnB] = "....." )
How to replicate the same in Power BI using DAX.
Please advise..

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,244 questions
Not Monitored
Not Monitored
Tag not monitored by Microsoft.
36,002 questions
{count} votes

Accepted answer
  1. Lukas Yu -MSFT 5,816 Reputation points
    2020-12-04T02:43:08.097+00:00

    Hi,

    The DAX expression should be like :

    = CALCULATE (COUNT([ColumnA]),'TableName'[ColumnB] = ".....")  
    

    Lukas


    If the answer is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
    What can I do if my transaction log is full?--- Hot issues November
    How to convert Profiler trace into a SQL Server table -- Hot issues November

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful