Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a formula written into a Measure that produces an acceptable outcome.
Here is the formula.
if(max([Ship Year])='2020','Current',if(max([Ship Year])='2019','Lost','Gone'))
I am trying to understand the right chart to add that will show the count of each of the 3 types (Current,Lost, Gone)
What chart type do I use and how is the count function written?
Thank you!
use this expression as Dimension field:
if([Ship Year]='2020','Current',if([Ship Year]='2019','Lost','Gone')
and as a expression use the count
I'm assuming that you are counting something like Customers (I'll assume a field "CustomerId") that have multiple ship years. Use a calculated dimension with an Aggr like:
Aggr( if(max([Ship Year])='2020','Current',if(max([Ship Year])='2019','Lost','Gone')), CustomerId)
and a measure like:
Count(CustomerId)
You can use a table, bar or pie chart.
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com
Here is what I have.
In my Table,
I have by 5 dimensions
Sales Rep
Sales Division
Customer
Customer Number
Product
Then I have 5 measures
Last Ship Date = max([Ship Date])
First Ship Date = min([Ship Date])
Total No. Of Invoices = count([Invoice No.])
Product Business Status = if(Min([Ship Year])=2020,'New','Old')
Product Status = if(max([Ship Year])='2020','Current',if(max([Ship Year])='2019','Lost','Gone'))
Make a new table chart.
Dimension will be a formula:
=Aggr( if(max([Ship Year])='2020','Current',if(max([Ship Year])='2019','Lost','Gone')),[Customer Number])
Measure:
Count(DISTINCT [Customer Number])
-Rob
http://masterssummit.com
http://qlikviewcookbook.com
http://www.easyqlik.com