Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
simonb2013
Creator
Creator

1:N datasets - inverse bar chart

I have a main fact table, and for each record, a 'many' table lists various tags (key-value) .
Currently I have a simple bar chart with  elements from the fact table only :

  • dimension = Category 
  • measure = Count(distinct [id])

This tells me, how many items I have in each category.
Then using Filters from my [tag] table, I can select to see how many [id] in each category have a tag with key of  Size (or Weight or Colour).

But now I want to count the inverse.
So for each Category, the number of [id] that do NOT have a tag with key 'Colour|Size|Weight'

Hope someone can give a nudge in the right direction !?

Thanks if you can !

Table: Fact  Table: Tags  
Field: IdField: Category Field: IdField: KeyField: Value
ACat 1 AColourstring
BCat 1 ASizestring
CCat 2 AWeightstring
   BColourstring
   BSizestring
   CColourstring
   CSizestring
   CWeightstring
1 Reply
chrismarlow
Specialist II
Specialist II

Hi,

I think you would want to do joins in your script to create fields on your fact table for Colour, Size & Weight. You would then need to rework your other visualisations.

If you don't want to do that you could try something like the below, but note it is fragile, so if I select Key=Weight then I am not sure it gives the behaviour you would want. You would then get into using set analysis to stop selections applying ... which is where you should start to look back at if your data model is working for you 😀.

20200730_1.png

Cheers,

Chris.