60 Replies Latest reply: Apr 27, 2017 11:17 AM by Wallo Atkinson RSS

    Slow Calculations

    Thom Mumaw

      Good Morning everyone,

      I am having an issue with the amount of time it's taking to do a calculation.  When I select a singles sales office response is fine, however when I select a company code the CPU pegs.....Here is my count statement.

      Thanks

      count(distinct(if(FISPD = FISPD_CNT and InActive = '1' and FISYR = FISYR_CNT,[Employee Number])))

        • Re: Slow Calculations
          Sunny Talwar

          Create a flag in the script

          If(FISPD = FISPD_CNT and InActive = '1' and FISYR =FISYR_CNT, 1, 0) as Flag

           

          and then this

          Count(DISTINCT {<Flag = {1}>} [Employee Number])

            • Re: Slow Calculations
              Thom Mumaw

              Sort of hard to create a flag when the values are in two different tables....The FISYR_CNT and FISPD are in the EMP_CNTS table, FISYR and FISPD are in FiscalCalendar and InAvtive is in PA0000.

               

               

                • Re: Slow Calculations
                  Sunny Talwar

                  In that case you can either create a new table in the script where you can bring the necessary fields into single table to perform your test or I guess you will have to live with the slowness....

                   

                  or you can try the below which may or may not help

                  Count(DISTINCT {<[Employee Number] = {"=FISPD = FISPD_CNT and FISYR =FISYR_CNT"}, InActive = {1}>} [Employee Number])

                  • Re: Slow Calculations
                    Robin Hausdörfer

                    Hi Thom,

                     

                    could you explain what is stored exactly in the fields:

                    FISPD, FISPD_CNT, FISYR, FISYR_CNT ???

                      • Re: Slow Calculations
                        Thom Mumaw

                        FISPD is (001 - 012) months from table (FiscalCalendar)

                        FISPD_CNT is (001 - 012) months from summary table (EMP_CNTS)

                         

                        FISYR is (2013 - 2017) years from table (FiscalCalendar)

                        FISYR_CNT is (2013 - 2017) years from table (EMP_CNTS)

                          • Re: Slow Calculations
                            Robin Hausdörfer

                            please try:

                             

                            autonumber(FISPD&'|'&FISPD_CNT) as KEY1

                             

                            and

                             

                            autonumber(FISYR&'|'&FISYR_CNT) as KEY2

                             

                            and change you expression the following way:

                             

                            count({<InActive = {1}>} distinct(if(KEY1= KEY2,[Employee Number])))

                              • Re: Slow Calculations
                                Thom Mumaw

                                FISYR and FISYR_CNT are in 2 separate tables....how can I used autonumber, same with

                                FISPD and FISPD_CNT

                                • Re: Slow Calculations
                                  Robin Hausdörfer

                                  you're right, you cant't

                                    • Re: Slow Calculations
                                      Robin Hausdörfer

                                      --> i just mixed it up... perhaps it is a bit faster...

                                       

                                      please try:

                                       

                                      autonumber(FISYR_CNT&'|'&FISPD_CNT) as KEY1

                                       

                                      and

                                       

                                      autonumber(FISYR&'|'&FISPD) as KEY2

                                       

                                      and change you expression the following way:

                                       

                                      count({<InActive = {1}>} distinct(if(KEY1= KEY2,[Employee Number])))

                                        • Re: Slow Calculations
                                          Thom Mumaw

                                          Still very slow and pegging CPU at 100%

                                          • Re: Slow Calculations
                                            Thom Mumaw

                                            I have modified my script to include FISYR, QTR, FISPD, WEDAT and WKNO in PA0000.  I added KEY1 and KEY2, but still very slow.

                                            thanks

                                              • Re: Slow Calculations
                                                Robin Hausdörfer

                                                a) So did you try the approach of Sunny with the flag?

                                                 

                                                Create a flag in the script

                                                If(FISPD = FISPD_CNT and InActive = '1' and FISYR =FISYR_CNT, 1, 0) as Flag

                                                 

                                                and then this

                                                Count(DISTINCT {<Flag = {1}>} [Employee Number])

                                                 

                                                b) How many rows are in PA0000?

                                                c) Which kind of chart do you use?

                                                d) you can remove KEY1 and KEY2...

                                                 

                                                Please provide as much information as possible

                                                  • Re: Slow Calculations
                                                    Thom Mumaw

                                                    FISPD and FISPD_CNT are in 2 separate tables.....

                                                      • Re: Slow Calculations
                                                        Robin Hausdörfer

                                                        and joining this fields into PA0000? multiplies the rows or?

                                                          • Re: Slow Calculations
                                                            Thom Mumaw

                                                            I was able to get everything onto one table using the function Concat.  Here is my script and at the bottom I shared a snapshot of the report.

                                                            Temp:
                                                            LOAD FISPD,
                                                            FISYR,
                                                            [Billing Date] as  [Start Date],
                                                            WEDAT,
                                                            WKNO
                                                            // autonumber(FISYR&'|'&FISPD) as KEY2 
                                                            FROM [D:\Qlikview\New Sales\QVD\ZZZWEDAT DaveyTree v1.0.qvd] (qvd)
                                                            where FISYR >= '$(vPYear)' and FISYR < '$(vYear)';

                                                            Left Join Temp:
                                                            LOAD * INLINE [FISPD, QTR, MTH
                                                            001, 1, Jan,
                                                            002, 1, Feb,
                                                            003, 1, Mar,
                                                            004, 2, Apr,
                                                            005, 2, May,
                                                            006, 2, Jun,
                                                            007, 3, Jul,
                                                            008, 3, Aug,
                                                            009, 3, Sep,
                                                            010, 4, Oct,
                                                            011, 4, Nov,
                                                            012, 4, Dec
                                                            ]
                                                            ;


                                                            Left Join (Temp)
                                                            LOAD
                                                            [End Date],
                                                            [Start Date],
                                                            Year((Date(Floor([Start Date])))) as StartYear,
                                                            num(Date(Floor([Start Date]))) as NumStartDate,
                                                            [Employee Number],
                                                            [Employee Number] as PA0000_EmpID,
                                                            [Employee Number] as PA0041_EmpID,
                                                            [Reason f.Action_MASSG],
                                                            [Action Type_MASSN] as [Action Type],
                                                            Employment_STAT2,
                                                            [Week Ending],
                                                            [Reason f.Action_MASSG] & [Action Type_MASSN] as [Term Event] 
                                                            FROM
                                                            [D:\Qlikview\QVD\PA0000.qvd] (
                                                            qvd)
                                                            Where Employment_STAT2 = '0' or
                                                            Employment_STAT2 = '1' or
                                                            Employment_STAT2 = '2'
                                                            ;

                                                            Right Join (Temp)
                                                            LOAD [Employee Number],
                                                            Max([Start Date]) as [Start Date]
                                                            Resident Temp
                                                            Where Year([Start Date]) >= '$(vPrevYear)'
                                                            Group By [Employee Number]

                                                            ;
                                                            NoConcatenate
                                                            PA0000:
                                                            LOAD *,
                                                            if(Match([Action Type],'24','25','26','27','77','78','79','84'),1,0) as InActive
                                                            Resident Temp
                                                            Where Year([Start Date]) >= '$(vPrevYear)'
                                                            ;

                                                            DROP Table Temp;

                                                            Left join (PA0000)
                                                            LOAD
                                                            [Employee Number],
                                                            [Employee Number] as EmpNo,
                                                            [Profit Center],
                                                            Job_STELL 
                                                            FROM
                                                            [D:\Qlikview\QVD\PA0001.qvd]
                                                            (
                                                            qvd)
                                                            where [End Date] = '9999-12-31'
                                                            ;

                                                            Emp_Summ:
                                                            LOAD [Profit Center],
                                                            FISYR
                                                            QTR
                                                            FISPD,
                                                            WEDAT,
                                                            WKNO,
                                                            TIMEIND,
                                                            Avg_Emp_Cnt
                                                            FROM
                                                            [D:\Qlikview\HR Loads\QVD\EMP_CNTS.QVD]
                                                            (
                                                            qvd);

                                                            CONCATENATE  (PA0000)
                                                            LOAD *
                                                            RESIDENT Emp_Summ;

                                                            DROP TABLE Emp_Summ;

                                                            EXIT Script;

                                                             

                                                            Now if you notice my report I have one line which is null values and I need to display that value on every line.....for example for 2017 the number 18 should be on every line so I can calc the % by action.

                                                            Thanks

                                                             

                                                              • Re: Slow Calculations
                                                                Stefan Wühl

                                                                You can use the TOTAL qualifier in your expression to achieve that (use a field list to only apply total on parts of your dimensions, not listed in the field list):

                                                                 

                                                                For example

                                                                =Sum(TOTAL<FISYR> Avg_Emp_Cnt)

                                                                  • Re: Slow Calculations
                                                                    Thom Mumaw

                                                                    Thanks Stefan,

                                                                    Worked perfectly.  Now the next question.  I have Quarters, months and weeks.  How can that be handled?  Here is what I see with quarters.....

                                                                     

                                                                     

                                                                      • Re: Slow Calculations
                                                                        Stefan Wühl

                                                                        Maybe just adapt the TOTAL qualifier field list to the fields used in your dimension (the dimension fields you still like to group your data by).

                                                                         

                                                                        =Sum(TOTAL<QTR> Avg_Emp_Cnt)

                                                                         

                                                                        If you need to restric the data to specific years and you do this in your expression, apply the same using e.g. set analysis.

                                                                         

                                                                        BTW. It's easier to help if you describe your charts in terms of dimensions and expressions used (in combination with a screenshot).

                                                                          • Re: Slow Calculations
                                                                            Thom Mumaw

                                                                            I have 2 tables which I have concatenated.  One is a detail table and the other is summary count of the average number of employees by Office, Year, Quarter, Month and Week.  I need to create charts showing reason for turnover (action) based on the above time dims.  The example you furnished me for years works great.  I used this:

                                                                                    Sum(TOTAL{<FISYR = {$(=$(vFisYr) - 0)},TIMEIND = {Y}>} Avg_Emp_Cnt)

                                                                             

                                                                            The attached screen shot is based on Quarters, but shows the total year.  When I change the TIMEIND to "Q" is sums all the Quarters together (50).  I should have 22 employees in Q1, and 28 employees in Q2. 

                                                                             

                                                                            Thanks for all your help.

                                                              • Re: Slow Calculations
                                                                Wallo Atkinson

                                                                By adding FISPD and FISYR to PA0000, can't you just do:

                                                                =count(distinct {<InActive = {1}>} [Employee Number])

                                                                 

                                                                And not go to the EMP_CNTS table at all?

                                                    • Re: Slow Calculations
                                                      Vineeth Pujari

                                                      Your fields "FISYR" and "FISYR_CNT" from the Fiscalcalendar are based on the "StartDate" from PA0000,

                                                      You can easily recreate them in PA0000 for creating the FLAG field.

                                                  • Re: Slow Calculations
                                                    Oleg Troyansky

                                                    Hi Thom,

                                                     

                                                    can you please describe in plain English what business question are you trying to answer, and what is your data structure that you use to answer this question? I'm pretty sure there must be a better way...


                                                    cheers,

                                                    Oleg Troyansky

                                                      • Re: Slow Calculations
                                                        Thom Mumaw

                                                        There's a business requirement to track total employee counts and turnover percentages for the past 5 years (Year, Quarter, Month, Week)  by action (termination, layoff, leave of absence,Etc.) and reason for termination (lack of work, attend school, illness / injury, Etc.).  I have created a summary file EMP_CNTS which contains the total number of employees by year, quarter, month and week.  I need to get the actions and reasons from PA0000 which carries the date of termination.  Hope this helps.  Thanks

                                                          • Re: Slow Calculations
                                                            Oleg Troyansky

                                                            So, to summarize my understanding:

                                                             

                                                            - you have multiple fact tables (some of them aggregated) and to avoid synthetic keys, you renamed identical fields like Profit Center, FY, FQ, FP in one (some) of the tables

                                                             

                                                            - now, you are trying to restore the same associations in a chart expression using multiple IF Conditions and tying these multiple renamed fields, and it is obviously very slow.

                                                             

                                                            If I may suggest... You are always better off to leverage Qlik associative logic and resolve these issues in your data model, rather than in a chart expression. Working with Qlik data associations is a lot faster than trying to tie the same fields using IF conditions.

                                                             

                                                            So, one option is to build a Link Table that would connect the multiple fact tables with their identical Key fields (Profit Center, TY, FQ, FP, ...). Refer to Barry Harmsen's "Data Modeling" session from the Masters Summit for a practical example of how to do it.

                                                             

                                                            For truly large data sets, however, we know that Link Tables don't perform very well (remember my Performance Tuning session at the Masters Summit?). Therefore, we typically recommend concatenating multiple facts into a single Fact Table. Sometimes it requires restoring some missing associations, but it's worth the trouble because of the better performance. Barry's session covers these topics, too.

                                                             

                                                            Once you have one of the two "valid" data models for multiple fact tables (either a Link Table, or a Concatenated Fact), then you won't need to tie multiple renamed fields together, and your remaining conditions will be simple enough for a simple Set Analysis (covered in my session at the Masters Summit).

                                                             

                                                            I think you have all the tools in your hands, now it's just about applying them to your pretty complex business scenario.

                                                             

                                                            cheers,

                                                            Oleg Troyansky

                                                              • Re: Slow Calculations
                                                                Thom Mumaw

                                                                I took your suggestion and created link tables.  However, this is what I see.  I need the summary totals for each action because that is the total number of employees in each qtr compared to the total for the action.  When I suppress null values I get zeros in the 2017 - 2013 columns. How can I associate the totals with each action?  I have made my linkkey (Profit Center, Fisyr, Qtr, Fispd, Wkno, Wedat).  Thanks

                                                                 

                                                                 

                                                                 

                                                                 

                                                                 

                                                                  • Re: Slow Calculations
                                                                    Anna fuksa

                                                                    could you post your app ?

                                                                      • Re: Slow Calculations
                                                                        Thom Mumaw

                                                                        Not easily....

                                                                          • Re: Slow Calculations
                                                                            Anna fuksa

                                                                            ok, what is the formula for KPI ?

                                                                              • Re: Slow Calculations
                                                                                Thom Mumaw

                                                                                2017:

                                                                                Sum(TOTAL<FISYR,QTR>{<FISYR = {$(=$(vFisYr) - 0)},TIMEIND = {Q}>} Avg_Emp_Cnt)

                                                                                 

                                                                                Action:

                                                                                 

                                                                                count({<InActive = {1},FISYR = {$(vFisYr)}>} DISTINCT([Employee Number]))

                                                                                 

                                                                                %

                                                                                 

                                                                                count({<InActive = {1},FISYR = {$(vFisYr)}>} DISTINCT([Employee Number])) /
                                                                                Sum(TOTAL<FISYR,QTR>{<FISYR = {$(=$(vFisYr) - 0)},TIMEIND = {Q}>} Avg_Emp_Cnt)

                                                                                 

                                                                                 

                                                                                I have attached the qvw

                                                                                 

                                                                                 

                                                                                  • Re: Slow Calculations
                                                                                    Anna fuksa

                                                                                    Please check my app.

                                                                                     

                                                                                    there is no data for 2013 it is why is 0

                                                                                      • Re: Slow Calculations
                                                                                        Thom Mumaw

                                                                                        What did you do?

                                                                                        • Re: Slow Calculations
                                                                                          Thom Mumaw

                                                                                          Anna,

                                                                                          Check this one out.  This is what one of the reports needs to look like without the action being blank.  The blank action is coming from the summary table.  The summary table is made up of employee totals by profit center, year (Y timeind), quarter (Q timeind), period (M timeind), W (W timeind).  I need to match the summary table  EMP_Sum (summary totals)  with the details from the Employee Detail.  The detail table carries why the employee was terminated. The summary table does not have the action on it.

                                                                                           

                                                                                            • Re: Slow Calculations
                                                                                              Anna fuksa

                                                                                              I am sorry i did not understand you. Can you explain ?

                                                                                                • Re: Slow Calculations
                                                                                                  Thom Mumaw

                                                                                                  There are 2 tables a summary table which has counts of employees by profit center based on a time-ind.  The time-ind can have values of Y for year, Q for quarter, M for month and W for week.  Take a look at this script it might make more since.

                                                                                                   

                                                                                                  CurrentDate:
                                                                                                  LOAD FISPD,
                                                                                                  FISYR,
                                                                                                  [Billing Date],
                                                                                                  WEDAT,
                                                                                                  WKNO
                                                                                                  FROM [D:\Qlikview\New Sales\QVD\ZZZWEDAT DaveyTree v1.0.qvd] (qvd)
                                                                                                  where [Billing Date] = '$(vToday)';

                                                                                                  LET vFisYr = peek('FISYR', 0, 'CurrentDate');
                                                                                                  LET vFisPd = peek('FISPD', 0, 'CurrentDate');
                                                                                                  LET vWkNo  = peek('WKNO', 0, 'CurrentDate');

                                                                                                  DROP TABLE CurrentDate;

                                                                                                  Temp:
                                                                                                  LOAD FISPD,
                                                                                                  FISYR,
                                                                                                  [Billing Date] as Date_ZWKDATE,
                                                                                                  WEDAT,
                                                                                                  WKNO
                                                                                                  FROM [D:\Qlikview\New Sales\QVD\ZZZWEDAT DaveyTree v1.0.qvd] (qvd)
                                                                                                  where FISYR >= '$(vPYear)' and FISYR < '$(vYear)';

                                                                                                  Left Join Temp:
                                                                                                  LOAD * INLINE [FISPD, QTR, MTH
                                                                                                  001, 1, Jan,
                                                                                                  002, 1, Feb,
                                                                                                  003, 1, Mar,
                                                                                                  004, 2, Apr,
                                                                                                  005, 2, May,
                                                                                                  006, 2, Jun,
                                                                                                  007, 3, Jul,
                                                                                                  008, 3, Aug,
                                                                                                  009, 3, Sep,
                                                                                                  010, 4, Oct,
                                                                                                  011, 4, Nov,
                                                                                                  012, 4, Dec
                                                                                                  ]
                                                                                                  ;

                                                                                                  Left Join (Temp)
                                                                                                  LOAD //CoCode_ZBUKRS,
                                                                                                     [Cost Ctr_ZKOSTL] as [Profit Center],
                                                                                                  Date_ZWKDATE,
                                                                                                  EmpCt_ZEMPCT
                                                                                                  FROM
                                                                                                  [D:\Qlikview\HR Loads\QVD\ZPQVEMPCTS.QVD]
                                                                                                  (
                                                                                                  qvd)
                                                                                                  where [Cost Ctr_ZKOSTL] <> ' ';

                                                                                                  NoConcatenate
                                                                                                  EMP:
                                                                                                  Load
                                                                                                  FISYR,
                                                                                                  QTR,
                                                                                                  FISPD,
                                                                                                  MTH,
                                                                                                  WKNO,
                                                                                                  WEDAT,
                                                                                                  [Profit Center],
                                                                                                  EmpCt_ZEMPCT
                                                                                                  Resident Temp
                                                                                                  ;
                                                                                                  DROP Table Temp;


                                                                                                  EMP_QTR:
                                                                                                  Load
                                                                                                  FISYR,
                                                                                                  QTR,
                                                                                                  [Profit Center],
                                                                                                  avg(EmpCt_ZEMPCT) as Avg_Emp_Cnt,
                                                                                                  'Q' 
                                                                                                  as TIMEIND

                                                                                                  Resident EMP
                                                                                                  Group By [Profit Center], FISYR, QTR //, FISPD //, MTH //, WKNO,[WEDAT]
                                                                                                  ;

                                                                                                  STORE * FROM [EMP_QTR] INTO QVD/EMP_QTR.QVD;

                                                                                                  DROP TABLE [EMP_QTR];

                                                                                                  EMP_MTH:
                                                                                                  Load
                                                                                                  FISYR,
                                                                                                  FISPD,
                                                                                                  [Profit Center],
                                                                                                  avg(EmpCt_ZEMPCT) as Avg_Emp_Cnt,
                                                                                                  'M' 
                                                                                                  as TIMEIND

                                                                                                  Resident EMP
                                                                                                  Group By [Profit Center], FISYR, FISPD //QTR //, //, MTH //, WKNO,[WEDAT]
                                                                                                  ;

                                                                                                  STORE * FROM [EMP_MTH] INTO QVD/EMP_MTH.QVD;

                                                                                                  DROP TABLE [EMP_MTH];

                                                                                                  EMP_YEAR:
                                                                                                  Load
                                                                                                  FISYR,
                                                                                                  [Profit Center],
                                                                                                  avg(EmpCt_ZEMPCT) as Avg_Emp_Cnt,
                                                                                                  'Y' 
                                                                                                  as TIMEIND

                                                                                                  Resident EMP
                                                                                                  Group By [Profit Center], FISYR //, FISPD //QTR //, //, MTH //, WKNO,[WEDAT]
                                                                                                  ;

                                                                                                  STORE * FROM [EMP_YEAR] INTO QVD/EMP_YEAR.QVD;

                                                                                                  DROP TABLE [EMP_YEAR];

                                                                                                  EMP_WEDAT:
                                                                                                  Load
                                                                                                  FISYR,
                                                                                                  WEDAT,
                                                                                                  WKNO,
                                                                                                  [Profit Center],
                                                                                                  avg(EmpCt_ZEMPCT) as Avg_Emp_Cnt,
                                                                                                  'W' 
                                                                                                  as TIMEIND

                                                                                                  Resident EMP
                                                                                                  Group By [Profit Center], FISYR, WEDAT, WKNO //, FISPD //QTR //, //, MTH //, WKNO,[WEDAT]
                                                                                                  ;

                                                                                                  STORE * FROM [EMP_WEDAT] INTO QVD/EMP_WEDAT.QVD;

                                                                                                  DROP TABLE [EMP_WEDAT];

                                                                                                  DROP Table EMP;

                                                                                                   

                                                                                                  EMP_COUNT:
                                                                                                  LOAD FISYR,
                                                                                                  [Profit Center],
                                                                                                  Avg_Emp_Cnt,
                                                                                                  TIMEIND
                                                                                                  FROM
                                                                                                  [D:\Qlikview\HR Loads\QVD\EMP_YEAR.QVD]
                                                                                                  (
                                                                                                  qvd);

                                                                                                  EMP_QTR:
                                                                                                  LOAD FISYR,
                                                                                                  QTR,
                                                                                                  [Profit Center],
                                                                                                  Avg_Emp_Cnt,
                                                                                                  TIMEIND
                                                                                                  FROM
                                                                                                  [D:\Qlikview\HR Loads\QVD\EMP_QTR.QVD]
                                                                                                  (
                                                                                                  qvd);

                                                                                                  CONCATENATE  (EMP_COUNT)
                                                                                                  LOAD *
                                                                                                  RESIDENT EMP_QTR;

                                                                                                  Drop Table EMP_QTR;

                                                                                                  EMP_MTH:
                                                                                                  LOAD FISYR,
                                                                                                  FISPD,
                                                                                                  [Profit Center],
                                                                                                  Avg_Emp_Cnt,
                                                                                                  TIMEIND
                                                                                                  FROM
                                                                                                  [D:\Qlikview\HR Loads\QVD\EMP_MTH.QVD]
                                                                                                  (
                                                                                                  qvd);

                                                                                                  CONCATENATE  (EMP_COUNT)
                                                                                                  LOAD *
                                                                                                  RESIDENT EMP_MTH;

                                                                                                  Drop Table EMP_MTH;

                                                                                                  EMP_WEDAT:
                                                                                                  LOAD FISYR,
                                                                                                  WEDAT,
                                                                                                  WKNO,
                                                                                                  [Profit Center],
                                                                                                  Avg_Emp_Cnt,
                                                                                                  TIMEIND
                                                                                                  FROM
                                                                                                  [D:\Qlikview\HR Loads\QVD\EMP_WEDAT.QVD]
                                                                                                  (
                                                                                                  qvd);

                                                                                                  CONCATENATE  (EMP_COUNT)
                                                                                                  LOAD *
                                                                                                  RESIDENT EMP_WEDAT;

                                                                                                  Drop Table EMP_WEDAT;

                                                                                                  NoConcatenate
                                                                                                  EMP_CNTS:
                                                                                                  Load *
                                                                                                  Resident EMP_COUNT;

                                                                                                  STORE * FROM [EMP_CNTS] INTO QVD/EMP_CNTS.QVD;

                                                                                                  DROP TABLE [EMP_CNTS];

                                                                                                  • Re: Slow Calculations
                                                                                                    Thom Mumaw

                                                                                                    Thanks for all your help....getting closer.

                                                                                              • Re: Slow Calculations
                                                                                                Wallo Atkinson

                                                                                                As a side note, when you are concatenating numbers like that for a key, you probably want to use a delimiter type character to separate the fields within the key.  I usually use a pipe.  For example.

                                                                                                =Field1 & '|' & Field2 & '|' & Field3

                                                                                                 

                                                                                                This should eliminate the chance of incorrect key duplication.

                                                                                                • Re: Slow Calculations
                                                                                                  Thom Mumaw

                                                                                                  You have to keep the TIMEIND at Q because I what Quarterly measures.  There are separate measures based on Y,Q,M,W TIMEIND.....

                                                                                  • Re: Slow Calculations
                                                                                    Anna fuksa

                                                                                    try

                                                                                    count(distinct({<FISPD = {FISPD_CNT} ,InActive = {1} , FISYR ={FISYR_CNT}>}[Employee Number]))


                                                                                    Could you share your app ? I would like to see the model.


                                                                                    Anna