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: 
analytics_qs1996
Contributor
Contributor

How can I tag dimensions based on the resulting sums of a measure?

Hello Community, 

I used to work with Tableau and DOMO and I could do this very easily but I am not able to do it in Qliksense. I want to tag values based on the results of a sum (or any aggr) for a measure. Let's say I have a list of countries where we have sales targets for this year for all countries but we have some sales for some countries and some don't. :sales and targets by country.jpg

 

How can I tag the countries ('Business Group') so I tag those who has sales ('Actuals YTD') as 'Live Countries' and those who are not as 'not-live' countries?  I am trying to understand how to tag dimensiones based on results from measures. Thank you

Labels (1)
2 Replies
edwin
Master II
Master II

its not clear what you mean by tag, but you just want a new column that says Y/N (as being tagged), then you can use your measure in an IF statement and test if > 0, 'Y' else 'N'

but if what you are saying is that you want a dropdown list of Countries that are live, then you can calculate the YTD sales in the load scrpt and add those countries to your field or create a new field ACTIVE = Y/N

edwin
Master II
Master II

it would be something like this:

YTDSales:
load Country, sum(Sales) as Sales resident Fact 
where FactDate >= yearStart(today);

left join (Fact)
load Country, 'Y' as IsActive
resident YTDSales where Sales>0;
drop table YTDSales;