Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Fabric community is upgrading! Read all of the details including the timeline and what you can expect. Learn more

Reply
RP_OFaustino
Helper I
Helper I

Total Count in Column

Hello MVPS,


I  thought that this was an easy scenario but I have burned 2 days without any success. 

 

Your Help will be greatly appreciated.


I have 2 questions. Here is the image of my table, not a matrix:

RP_OFaustino_0-1785279854072.png

1st Question: instead of 1 in "_M_Campaign_TotalCount", how can I make it to display 30 per row? I need to count how many times the "_fact_CampaignDetails_Pipeline.Campaign_Name__c" existed in my whole table:

2nd question: I have a 5th Column named "Earliest Responded Date". what function should i use to get the earliest responded date from the 4th Column "_fact_CampaignDetails_Pipeline.Responded_Date__c"

Again, any help would be appreciated!

 

1 ACCEPTED SOLUTION

@RP_OFaustino 

pls see if this is helpfule.

 

Measure = CALCULATE(COUNT('Table'[Product Name]),ALLEXCEPT('Table','Table'[Account],'Table'[Campaign Attended],'Table'[Contact]))
11.png
 
pls see the attachment below. if this does not work, pls update the sample data
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

10 REPLIES 10
RP_OFaustino
Helper I
Helper I

Hello @ryan_mayu @Ashish_Mathur @ajaybabuinturi @Olufemi7 !

My apologies for not being able to respond immediately and for not providing a detailed explanation of the problem.

Here are the details:

RP_OFaustino_0-1785858400206.png


I applied your suggested solutions in creating the dax measures but it is displaying a much larger number.

What I did was, I referenced the transaction table in power query, then group them by concatenated Opporunity ID and Campaign name then count Rows.


RP_OFaustino_1-1785858801479.png

 


Then created a relationship between the transaction table and new grouped transaction table. Making it like a reference. Then used Related Function to get the number.

It's very excel like on the approach, but it does get the me the correct number.

Again, thank you for all your help!

@RP_OFaustino 

pls see if this is helpfule.

 

Measure = CALCULATE(COUNT('Table'[Product Name]),ALLEXCEPT('Table','Table'[Account],'Table'[Campaign Attended],'Table'[Contact]))
11.png
 
pls see the attachment below. if this does not work, pls update the sample data
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi,

Please share the download link of the PBI file.  Show the problem and expeced result there clearly.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
RP_OFaustino
Helper I
Helper I

Hello @ryan_mayu @Ashish_Mathur @ajaybabuinturi @Olufemi7 !

My apologies for not being able to respond immediately and for not providing a detailed explanation of the problem.

Here are the details:

RP_OFaustino_0-1785858400206.png


I applied your suggested solutions in creating the dax measures but it is displaying a much larger number.

What I did was, I referenced the transaction table in power query, then group them by concatenated Opporunity ID and Campaign name then count Rows.


RP_OFaustino_1-1785858801479.png

 


Then created a relationship between the transaction table and new grouped transaction table. Making it like a reference. Then used Related Function to get the number.

It's very excel like on the approach, but it does get the me the correct number.

Again, thank you for all your help!

Hi @RP_OFaustino,

Glad to hear you got the correct result, and thanks for taking the time to share what worked for you—it'll be helpful for others too.

 

Thank you.

 

Thank you @v-saisrao-msft ! the experts that helped and will help me in the future are truly amazing! Will drill down on their suggestions more and apply it in my project as well.

ryan_mayu
Super User
Super User

not clear about this request. could you pls provide some sample data and expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Ashish_Mathur
Super User
Super User

Hi,

Does this measure work

Measure = countrows(allselected(Data[c_opp_name]))

If it does not, then please share the download link of the PowerBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ajaybabuinturi
Super User
Super User

Hello @RP_OFaustino ,
I would like to let you know that this depends on whether you want the calculation to respect filters/slicers or always return the total for the entire dataset. In most Power BI reports, measures are the preferred approach.

For 1st Que Answer: Use below measure to get Campagin Name count

Campaign Total Count =
CALCULATE(
    COUNT('TableName'[Campaign_Name__c]),
    ALLEXCEPT(
        'TableName',
        'TableName'[Campaign_Name__c]
    )
)

For 2nd Que Answer: Use below measure to get Earliest Responded Date

Earliest Responded Date =
CALCULATE(
    MIN('TableName'[Responded_Date__c]),
    ALLEXCEPT(
        'TableName',
        'TableName'[Campaign_Name__c]
    )
)

 

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

Olufemi7
Super User
Super User

Hello @RP_OFaustino,
If you're trying to show how many times each Campaign_Name__c appears in the table, CALCULATE() together with ALLEXCEPT() should do it. That keeps the campaign as your filter while dropping the other columns, so every row for the same campaign ends up showing the same count.
For the earliest responded date, MIN() is the function I will use, wrapped in CALCULATE() with the same ALLEXCEPT() grouping. Again, the grouping matters. If you want the earliest date for each campaign, use the same grouping as the count.
Can you confirm whether _M_Campaign_TotalCount is a measure or a calculated column? If you can also post the DAX you're using now, it'll be easier to suggest the smallest change.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.