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

How to have COUNT (TOTAL..) to ignore one selection.

I have the following measure expression:

COUNT(OrderItemId) / COUNT(TOTAL < [PaidDate.Calendar.YearMonth] > OrderItemId)

But wanted for the total on the denominator (above) not to change when the dimension [ManufacturerName] is selected.

What can I include below to ignore the [ManufacturerName] selection:

COUNT(TOTAL < [PaidDate.Calendar.YearMonth] > OrderItemId)

10 Replies
swuehl
MVP
MVP

I personally use old style Qlik master calenders like

MasterCalendar:

LOAD

  TempDate AS Date,

  Year(TempDate) AS Year,

  Month(TempDate) AS Month,

  Weekday(TempDate) AS WeekDay,

  inyeartodate(TempDate, maxdate, 0) * -1 AS CurYTDFlag,

  inyeartodate(TempDate, maxdate, -1) * -1 AS LastYTDFlag

;

//=== Generate a temp table of dates ===

LOAD

  date(mindate + IterNo()) AS TempDate

  ,maxdate // Used in InYearToDate() above, but not kept

WHILE mindate + IterNo() <= maxdate

;

//=== Get min/max dates from fact table ===/

LOAD

  min(Date)-1 as mindate,

  max(Date) as maxdate

RESIDENT Facts

;

The Fastest Dynamic Calendar Script (Ever)