cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Counting the number of Campaign ID's

Hi All,

 

Below is an example of the dataset to which I wanted to be able to return the total number of campaign ID's given in the first instance, then counting the number of campaign ID's that were given in the second instance .

 

Gift DateCampaign IDGift Date 2Campaign ID 2
02/04/2018Camp - 12115/05/2018Camp - 252
12/05/2019Camp - 23216/05/2019Camp - 252
06/05/2019Camp - 12123/05/2019Camp - 252
07/06/2019Camp - 23201/06/2019Camp - 252
08/05/2019Camp - 12112/05/2019Camp - 555
09/06/2018Camp - 12123/06/2018Camp - 252
10/06/2019Camp - 12112/06/2019Camp - 252
11/06/2018Camp - 23215/06/2018Camp - 232
12/06/2019Camp - 12115/06/2018Camp - 232
13/06/2018Camp - 12117/06/2018Camp - 232
Total10  
    
 2526 
 5551 
 2323 

 

I tried doing a count, but keep getting errors. didnt know if there was an alternative way of doing this?

 

TIA

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: Counting the number of Campaign ID's

Hi @UK_User123456 ,

The following is my sample you can have a try.

 

For table 1 :

  1. Create a measure.
Measure = COUNT(Table1[Campaign ID])

1.png

For table 2:

  1. Create a measure
Measure 2 = 
SWITCH(     TRUE(),     MAX(Table4[Campaign ID 2]) = "Camp - 252",CALCULATE(COUNT(Table4[Campaign ID 2]),ALLEXCEPT(Table4,Table4[Campaign ID 2])),     MAX(Table4[Campaign ID 2]) = "Camp - 232",CALCULATE(COUNT(Table4[Campaign ID 2]),ALLEXCEPT(Table4,Table4[Campaign ID 2])), MAX(Table4[Campaign ID 2]) = "Camp - 555",CALCULATE(COUNT(Table4[Campaign ID 2]),ALLEXCEPT(Table4,Table4[Campaign ID 2])))

2.jpg

Best Regards,

Xue Ding

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

View solution in original post

4 REPLIES 4
Community Support Team
Community Support Team

Re: Counting the number of Campaign ID's

Hi @UK_User123456 ,

The following is my sample you can have a try.

 

For table 1 :

  1. Create a measure.
Measure = COUNT(Table1[Campaign ID])

1.png

For table 2:

  1. Create a measure
Measure 2 = 
SWITCH(     TRUE(),     MAX(Table4[Campaign ID 2]) = "Camp - 252",CALCULATE(COUNT(Table4[Campaign ID 2]),ALLEXCEPT(Table4,Table4[Campaign ID 2])),     MAX(Table4[Campaign ID 2]) = "Camp - 232",CALCULATE(COUNT(Table4[Campaign ID 2]),ALLEXCEPT(Table4,Table4[Campaign ID 2])), MAX(Table4[Campaign ID 2]) = "Camp - 555",CALCULATE(COUNT(Table4[Campaign ID 2]),ALLEXCEPT(Table4,Table4[Campaign ID 2])))

2.jpg

Best Regards,

Xue Ding

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

View solution in original post

Community Support Team
Community Support Team

Re: Counting the number of Campaign ID's

Hi @UK_User123456 ,

Could you tell me if your problem has been solved? If it is, kindly mark the helpful answer as a solution if you feel that makes sense. Welcome to share your own solution. More people will benefit from here.

 

Best Regards,

Xue Ding

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

Re: Counting the number of Campaign ID's

Hi,

 

I havent had the chance to test it out yet, I will do as soon as I can and come back with any issues.

Community Support Team
Community Support Team

Re: Counting the number of Campaign ID's

Okay, I hope your issue can be solved smoothly. 

Helpful resources

Announcements
October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 138 members 1,681 guests
Please welcome our newest community members: