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

Announcements
Now accepting applications for the Qlik Luminary and Partner Ambassador Programs: Apply by July 6!
cancel
Showing results for 
Search instead for 
Did you mean: 
danm84306
Contributor III
Contributor III

Count If

Hello, I am trying to complete this calculation only counting data where the Location Column reads 'Remote'. Any ideas?

Sum(if(Type='T',[Time (Min)])/60/24)+Sum(if(Type='NT',[Time (Min)])/60/24))

/

((((
Count(Distinct Date&Name))*480)/60/24)-Sum(if(Type='P',[Time (Min)])/60/24)-(((Count(Distinct Date&Name)-Sum(if(Type='P',Quantity)))*30)/60/24))

Labels (1)
3 Replies
sunny_talwar
MVP
MVP

May be this:

Sum({<Location = {'Remote'}>} if(Type='T',[Time (Min)])/60/24) + Sum({<Location = {'Remote'}>} if(Type='NT',[Time (Min)])/60/24))

/

((((Count({<Location = {'Remote'}>} Distinct Date&Name))*480)/60/24)-Sum({<Location = {'Remote'}>} if(Type='P',[Time (Min)])/60/24)-(((Count({<Location = {'Remote'}>} Distinct Date&Name)-Sum({<Location = {'Remote'}>} if(Type='P',Quantity
)))*30)/60/24))

PrashantSangle
MVP
MVP

Hi,

try every expression in set analysis.

Sum({<Location = {'Remote'},Type={'T','NT'}>}[Time (Min)])/60/24

/

(
(
  (
   (
    Count({<Location = {'Remote'}>} Distinct Date&Name)
   )*480
  )/60/24
)
-
Sum({<Location = {'Remote'},Type={'P'}>}[Time (Min)])/60/24
-
(
  (
   (
    Count({<Location = {'Remote'}>} Distinct Date&Name)
    -
    Sum({<Location = {'Remote'},Type={'P'}>} Quantity)
   )*30
  )/60/24
)
)

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Kushal_Chawda
MVP
MVP

=((Sum({<Type{'T'}>}[Time (Min)])/60/24)+(Sum({<Type{'NT'}>}[Time (Min)])/60/24))

/

(((Count(Distinct Date&Name)*480)/60/24)-(Sum({<Type={'P'}>}[Time (Min)])/60/24)-(((Count(Distinct Date&Name)-Sum({<Type={'P'}>}Quantity))*30)/60/24))