If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Hi all,
I have an Expression counting the amount of Order ID, where each segment ID has an Occupancy at 0%.
It works great when I filter on one specific week, but when I for example choose two weeks, I need the formula to perform the calculation on each week on each segment ID, and not only if Segment ID is zero on both weeks. Any suggestions on how to make this Calculation inside a set Analysis per week, and not just on total for all weeks?
------------------------------------------------------------------------------------------------------------------------------
Count({<Year={$(=Max(Year))},[Group1],[ Group2]={"AB"},
[Segment ID] = {'=
If(
(1-((sum({<[Group1],[ID]={3},[Group2]={"AB"}>} [Sold])
/
(Sum({<[Group1],[Group2]={"AB"}>}[Capacity])-
Sum({<[Group1],[Group2]={"AB"}>}[Block])))))
=1,
(1-((sum({<[Group1],[ID]={3},[Group2]={"AB"}>} [Sold])
/
(Sum({<[Group1],[Group2]={"AB"}>}[Capacity])-
Sum({<[Group1],[Group2]={"AB"}>}[Block])))))
=1)
'}
>} [Order ID])
Would you be able to share sample with expected output?
No sorry, But I have simplyfied the formula:
Count({<Year={$(=Max(Year))},[Group1],[ Group2]={"AB"},
[Segment ID] = {'=
If(
(1-((sum({<[Group1],[ID]={3},[Group2]={"AB"}>} [Sold])
/
(Sum({<[Group1],[Group2]={"AB"}>}[Capacity])-
Sum({<[Group1],[Group2]={"AB"}>}[Block])))))
=1)
'}
>} [Order ID])