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

Count measure is removing the records that don't match set analysis criteria

Hi all,

I have a few data sources joined together and I have produced a table with all the relevant dimensions I need. I have also added a calculated measure that only counts certain records based on the set analysis criteria but the calculation means the records that don't match the criteria have now been omitted from the table and the only records left show a value of '1' in the calculated field with the total at the top.

Is there anyway for the 'Count'({})' measure to still show the omitted records as a value of '0'? I have made work around by including another calculated field that counts all records... but this seem silly and counter intuitive to me?

Thanks, 

Joe

Labels (1)
11 Replies
sunny_talwar

Would you be able to share a sample where we can see what you have?

Joseph_Kipling
Contributor III
Contributor III
Author

Yeah sure,

So without the added extra measure to include the other records I get this:

Screen Shot 2019-01-16 at 13.24.51.png

With the extra 'Fixed Counter' field I get this:

Screen Shot 2019-01-16 at 13.24.31.png

I would like the second table but only with one calculation...

The measures are:

Leads Count:

=count({<[Leads.Lead Number]={"=if(([Leads.LeadType]='Retail' and [Leads.LeadCode]=[Leaflet Design]) or ([Leads.LeadType]='Retail' and [Leads.IntervalWeek]<=4 and [Leads.ResponseChannel]='Web') or ([Leads.LeadType]='Retail' and [Leads.ResponseChannel]='Generic'),[Leads.Lead Number])"}>} distinct [Leads.LeadID]&[Leads.First]&[Leads.Last])

Fixed Count:

=count(distinct [Leads.LeadID]&[Leads.First]&[Leads.Last])

Thanks,

Joe

sunny_talwar


@Joseph_Kipling wrote:

 

I would like the second table but only with one calculation...


I still don't think I follow completely. You want both Leads Count and Fixed Counter, but you want to do this in a single expression? What would the output look like 0, 1 for the first row and 1, 1 for the second row? or just 01 and 11, respectively?

Joseph_Kipling
Contributor III
Contributor III
Author

So the 'Fixed Counter' is only there for me to be able to see the records that where not counted by the 'Lead Count' measure.

My question is : Is there a way for me to see the records that where not counted by the 'Lead Count' but for this to be done with 1 measure? so 1 record might have a '1' when the criteria is met in the Lead Count measure and a '0' when it is not met..? At the moment it only shows all the '1' values for the Lead Count measure on it's own. 

 

sunny_talwar

Can you check if you have 'Include Zero Value' checked under Add-on -> Data Handling

Joseph_Kipling
Contributor III
Contributor III
Author

Yes it is checked

sunny_talwar

Not sure, but if you are able to share your qvf file, I will be more than happy to take a look.

Joseph_Kipling
Contributor III
Contributor III
Author

Do you need the qvf with the data?

sunny_talwar

Yes, but this doesn't have to be the original data... mocked up data where you can replicate the issue is good enough