Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

set analysis in concat/aggr function?

Hi!

I'm trying to display the Team name that a person belongs to. Problem is that the person can belong to several teams in the past. What i want to see is only the team that the person blongs to today.

This is the one i'm currently using

concat(distinct aggr(if(sum(Points)>0,Team),Name,Team),',')

(Points must be moore than 0 by the way, hence the expression. )

But that gives me all the teams the person belongs to. how do i do this to include the Date issue?

//A.

12 Replies
kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    There can be some other way to do this.

    So can you please tell us something about your data structure.

    Meaninng how you find who is in which team today. (Manually)

Regards,

Kaushik Solanki

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

Team is in the fact table ande names in a dimension table.

So when i select a name the team that person belongs to is possible choices. And like i said, over time there can be more than one team but if you pick a date there will always only be one team for that selected person.

Does it help you?

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Then how you are willing to show that. I mean can you please tell me in detail with example, what you want to achieve.

Regards,

Kaushik Solanki

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

Hi,

You can use indirect set analysis, like this:

=Concat( {<TEAM = {"=SUM(POINTS)>0"}>} DISTINCT TEAM,',')

Anonymous
Not applicable
Author

sorry again.

I have a chart with name as dimension and then the expression to basically show possible team. but i only want to show one possible team, hence, the team that they have points in in the nearest future.

So i want it in text. The Team. and that's why i'm using the concat function.

//A.

erichshiino
Partner - Master
Partner - Master

Doesn't this concat work?

=Concat( {<TEAM = {"=SUM(POINTS)>0"}>} DISTINCT TEAM,',')

Regards,

Erich

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    Try this.

    In your chart put expression as

    maxstring({<Date = {"$(=Max(Date))"}>}Team)

Regards,

Kaushik Solanki   

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

Erich: your solution still shows more than one team unfortunately.

Kaushik: Yours is close but those who haven't had points (those are connected to dates) since last month or more ends up with no team at all

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

    I didnt get what you said. Can you please explain with example.

Regards,

Kaushik Solanki

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