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

Create a Master Dimension item from two fields

I need to be able to create a master dimension item from two fields in Qlik Sense. I have the following example data:

Call ID:                         Parent ID:

C1236                           C4568  

C12345                          

C1236                            C9876 

C123                              C9876

I need to be able to count the distinct [Call ID] and distinct [Parent ID] and then have this total be used as dimension. I am having difficulty getting this to work. I am able to get a count of the distinct [Call ID] but the fx is not counting the distinct [Parent ID]. I have been trying to use the following expression in a KPI object:  Count({<[Liaison Type]={'MSL','FSL'},Objective={'Presentations'},[Product: Description]={'XXX'}>} distinct [Call: Call ID]&'-'&[Parent Call]).

Any suggestions or assistance would be appreciated.

1 Solution

Accepted Solutions
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It may be because you are using the distinct for combination of Call ID and Parent ID.

Try this.

Count({<[Liaison Type]={'MSL','FSL'},Objective={'Presentations'},[Product: Description]={'XXX'}>} distinct [Call ID])

+

Count({<[Liaison Type]={'MSL','FSL'},Objective={'Presentations'},[Product: Description]={'XXX'}>} distinct [Parent Call])


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!

View solution in original post

2 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

It may be because you are using the distinct for combination of Call ID and Parent ID.

Try this.

Count({<[Liaison Type]={'MSL','FSL'},Objective={'Presentations'},[Product: Description]={'XXX'}>} distinct [Call ID])

+

Count({<[Liaison Type]={'MSL','FSL'},Objective={'Presentations'},[Product: Description]={'XXX'}>} distinct [Parent Call])


Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!
Not applicable
Author

Thanks for the response! This has seemed to work. One additional questions I have. I only want to count [Call ID] when there is not a record in the [Parent ID]. Could you assist with what I would need to add to the script to make this work?