DAX: Time intelligence and filtering out blank values

Hi all,
Quick question.  I'm currently calculating the length of time between two dates ('today' vs [Completed Date]) in a new column.  However, I cannot get the syntax correct to filter out the blanks in the [Completed Date] column.
My current formula is this:  =FLOOR(1. * ( today() - [Completed Date]) / 365, 0.25)
I just need one more piece to work around the blanks.  Any suggestions on what to add?
Thanks,
~UG

Use ISBLANK
=IF (ISBLANK([Completed Date]),BLANK(),FLOOR(1. * ( today() - [Completed Date]) / 365, 0.25))
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

Similar Messages

  • SSAS Multidimensional Time Intelligence YTD calculation showing BLANK for Date level

    Hi there,
    I am working with SSAS Multidimensional Cube, basically I have defined a Time Intelligence calculations for just YTD in the Cube, the calculation was created in the Calculations tab of the cube as follows:
    /*Year to Date*/
        [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Year to Date],
    [Dimension Dim Time].[Year].Members, 
        [Dimension Dim Time].[Date].Members   
      =
      Aggregate(
                 { [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Current Dimension Dim Time] } 
                 PeriodsToDate(
                                [Dimension Dim Time].[Calendar].[Year],
                                [Dimension Dim Time].[Calendar].CurrentMember
    My Calendar hierarchy is as follows:
    Year -> Quarter -> Month -> Week -> Date
    The problem I have is that when I am at Date level I am not getting the cumulative YTD value, instead I am just getting blank cells:
    Could anyone help me defining a Time Intelligence YTD calculation that works for all levels including the Date (highlighted in yellow above)?
    Thanks and best regards,
    Joss

    The only strange thing is the MDX script, I would have used this one instead (sse below) - but if this is not the issue, I would suggest you to isolate the issue in a simpler MDX script removing any other calculation.
    Also take a look at the DateTool solution for these calculations - I really don't like the wizard provided by the development environment, it has other issues but not something that should affect your calculation:
    http://www.sqlbi.com/articles/datetool-dimension-an-alternative-time-intelligence-implementation
    /*Year to Date*/
        [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Year to Date],
        [Dimension Dim Time].[Calendar].Members, 
        [Dimension Dim Time].[Date].Members   
      =
      Aggregate(
                 { [Dimension Dim Time].[Calendar Dimension Dim Time Calculations].[Current Dimension Dim Time] } 
                 PeriodsToDate(
                                [Dimension Dim Time].[Calendar].[Year],
                                [Dimension Dim Time].[Calendar].CurrentMember
    Marco Russo http://ssasworkshop.com http://www.sqlbi.com http://sqlblog.com/blogs/marco_russo

  • Performance Point - 1 Dashboard, 2 cubes, 1 Time intelligence filter, filtering 2 different date dimensions on different cubes!

    Hi
    Hope you are well.
    I have a challenge. I am working with Performance Point and a number of different cubes.
    In this case I need to include graphs and charts from 2 different cubes on one dashboard page.
    The challenge I have, is to be able to use a Time Intelligence filter from one cube, eg, [TimeSold].[Calendar hierarchy] on Cube 1, and for this to filter graphs from the second cube (second cube [Time].[Calendar hierarchy]), on one dashboard page. 
    Is there any way I can achieve this using MDX or Parameters within performance point?
    I cannot amend the cubes or dimensions. I have to work with the front end tools only.

    Hi ShebUK,
    I don't think we can achieve this requirement on the front end, but you can discuss this issue at the following forum:
    http://social.technet.microsoft.com/Forums/en-US/home?category=performancepointserver
    I'm not familiar with PerformancePoint Services and not sure that we can implement linked dimension to achieve this. A linked dimension is one that exists in one Analysis Services database, but reused in another Analysis Services database of the same version
    and compatibility level. For more information, please see:
    Define Linked Dimensions: http://msdn.microsoft.com/en-us/library/ms175648.aspx
    Hope this helps. 
    Regards,  
    Elvis Long
    TechNet Community Support

  • DAX - IF statement and filters within calculated column

    Hi all,
    I've got a bit of a complex formula I'm trying to run, but I'm not quite there yet.  I don't know where/how/if I can place a filter within my IF statement for a calculated column due to so many variables.  I either get errors or wrong numbers. 
    Hope the following makes sense. 
    Here is my formula for the calculated column [Years Since Last Task]:
    =IF (ISBLANK([Last Task Date]) && ([Current Role]<>BLANK()), DIVIDE([Quarters],4), FLOOR(1. * ( today() - [Last Task Date]) / 365, 0.25))
    Problem:  I am getting "114.25" for Ken....but I want a blank result instead.  Meaning, I need to also filter out any name (row) who has a blank [Current Role].  How do
    I add a filter to this current formula?  Is one more step of filtering possible in this IF statement?  (Maybe I shouldn't use an IF statement, and try CALCULATE instead?)
    Below is the table 'Work' for you to see what's happening.
    Name
    Quarters
    Last Task Date
    Current Role
    Years Since Last Task
    John
    1
    1
    0.25
    Mike
    4
    2/7/2011
    3
    3
    Todd
    5
    4/20/2009
    4
    5
    Jeff
    9/1/2013
    3
    0.5
    Ken
    0
    114.25
    Steve
    2
    12/3/2011
    2
    2.25
    Nate
    2
    1/1/2014
    2
    0.25
    Greg
    1
    8/11/2013
    1
    0.5
    Ross
    4
    11/9/2010
    4
    3.25
    Hope all this made sense.  Let me know if you have any thoughts.
    Thanks,
    ~UG1

    you can use nested IF-statements here:
    =IF (ISBLANK([Current Role]),
    BLANK(),
    IF(ISBLANK([Last Task Date]),
    DIVIDE([Quarters],4),
    FLOOR(1. * ( today() - [Last Task Date]) / 365,0.25)
    hth,
    gerhard
    Gerhard Brueckl
    blogging @ http://blog.gbrueckl.at
    working @ http://www.pmOne.com

  • Have been using your products since 1984. Very sorry I upgraded to Mountain Lion. Time consuming AND wiped out 2007 Quicken. I guess it would have been too much trouble to have red flagged this situation ahead of time. Out of business, literally.

    Have been using your products since 1984. Very sorry I upgraded to Mountain Lion. Wiped out all my old applications. Out of business until I get this fixxed. Can I go back to previous operating system? Time Machine?

    Downgrade Lion/Mountain Lion to Snow Leopard
    1.  Boot from your Snow Leopard Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Quit DU and return to the installer. Install Snow Leopard.
    This will erase the whole drive so be sure to backup your files if you don't have a backup already. If you have performed a TM backup using Lion be aware that you cannot restore from that backup in Snow Leopard (see below.) I suggest you make a separate backup using Carbon Copy Cloner 3.4.1.
    If you have Snow Leopard Time Machine backups, do a full system restore per #14 in Time Machine - Frequently Asked Questions.  If you have subsequent backups from Lion, you can restore newer items selectively, via the "Star Wars" display, per #15 there, but be careful; some Snow Leopard apps may not work with the Lion files.
    In the future:
    Before upgrading consider:
    Don't upgrade if you are in the midst of important work. Wait until you have finished.
    If you are having problems with your computer get them sorted out before you upgrade.
    Verify that any mission critical software will be compatible with the upgrade.

  • Time Machine and File Vault problems

    Hi,
    Since I converted to Mac more than a year ago, I turned my file vault on (although I learned in the meantime that it is not actually necessary....)
    I now recently bought the time Capsule and found out that the Time Machine doesn't go well with the File Vault turned on. It does back up the home folder only when logged out and I don't get the hourly backups for single files either.
    I then tried to turn File Vault off, but get the error message that I haven't got enough space on my hard disk (which I have). This message led me to this article here: http://support.apple.com/kb/TS1974
    I am really not an expert and not too confident to play around with accounts, backups and so on, so I really don't want to go down the described route.
    For me, it looks like a bug in OS X, I should be able to turn File Vault off with the click of a button. Also, why is the File Vault / Time Machine conflict nowhere mentioned ? I was playing round with TM to recover a single file, but this wasn't possible, that's why I went to explore the issue further...
    I now just want to turn off File Vault and finally want to use my TC normally.
    Who can help ?
    Message was edited by: Mike201071

    ....so, it seems to work now.
    I did eventually go through the routine of backing up my home folder manually on the TC, then I created a new account, copied everything back, deleted the old account, and so on, as described in the link above.
    I did not turn on the File Vault, activated TM and backed the whole lot up via Ethernet, switched back to wireless and TM seems to do the trick now.
    I have now access to single folders and files when I go back in time in TM, instead of the whole backup only.
    This seems to be the only way TM & TC are working properly, why is this conflict between File Vault and TM nowhere mentioned ?

  • HP PSC 2175 spits out blank paper while I print.

    I have Dell GX520 Desktop PC with Windows XP service pack 3 and HP PSC 2175 all-in-one printer. Since few days I m having trouble printing with my printer. When I try to print it simply picks up the paper scans it and spits out  blank paper instead of printing it. There is no any error message or flashing light or any thing in the printer.
    But still I can make copy or print the test page from it. The only thing is I can't print any document from WordPad or NotePad or through Adobe Reader. I don't have Office on my PC.
    I have tried every thing that I can do. Uninstall the driver and reinstalled  it  downloading from HP website,updated the drivers manually, replaced new cartridges and what not. But I still have the problem. It would be so helpful if you have any solution to this problem.

    I'm having the same problem....
    The computer is a hp pavilion.
    When trying to print, It loads the paper, It checks the paper position, then it just ejects the paper.
    I opened the print job que and watched it.
    When the print job ques up, it shows the job...then deletes the job before printing it.
    It has been working fine up until a few days ago.
    Any help would be appreciated.

  • Performance Point Filter Scorecard by Time Dimension (without Time Intelligence)

    Hello,
    I use Performance Point 2010 and want to build a Performance Point Dashboard with Scorecard. My requirement is to provide a List of Years as a Filter for a Scorecard.
    In the Scorecard I have a KPI which I want filter by Time Dimension. I can do this when I use "Time Intelligence" and "Time Intelligence Connection". But I want to use the "Member Selection Filter" to filter the Scorecard
    KPIs by Years (Selected from a List).
    I created a "Member Selection Filter" with certain Time Dimension and put Filter to a Dashboard. In my KPI Mapping Source I added a "new Dimension Filter" and choosed the same Time Dimension as
    in the "Member Selection Filter".
    When I try to connect the "Member Selection Filter" to my Scorecard, I can only choose the "Curent Date Time". As I know "Current Date Time" have to be used when Time Intelligence Filter is in use.
    How I have to connect the Scorecard with the "Member Selection Filter"?
    Thank you very much

    Hi ShebUK,
    I don't think we can achieve this requirement on the front end, but you can discuss this issue at the following forum:
    http://social.technet.microsoft.com/Forums/en-US/home?category=performancepointserver
    I'm not familiar with PerformancePoint Services and not sure that we can implement linked dimension to achieve this. A linked dimension is one that exists in one Analysis Services database, but reused in another Analysis Services database of the same version
    and compatibility level. For more information, please see:
    Define Linked Dimensions: http://msdn.microsoft.com/en-us/library/ms175648.aspx
    Hope this helps. 
    Regards,  
    Elvis Long
    TechNet Community Support

  • Time Intelligence current Week

    Hi I am new to performance point and I'm having difficulty to understand what it going on with the the time intelligence
    if I create  a date range and in the formulas I put the following
    day
    day-1
    year
    week
    I get the following results
    day = [Date Primary Date].[Year - Quarter - Week - Date].[Date].&[20140607]
    day-1 = [Date Primary Date].[Year - Quarter - Week - Date].[Date].&[20140606]
    year = [Date Primary Date].[Year - Quarter - Week - Date].[Year].&[20140101]
    week = [Date Primary Date].[Year - Quarter - Week - Date].[Week Name].&[2014-03-09]
    I understand them all apart from the week which doesn't give me the current week which should be 2014-05-31
    Why is this happening?

    I went back to the setting of the time intelligence and reconfigured the date members in the data source

  • When printing/copying pages come out blank on hp psc 2175

    When I print or copy the printer processes a page like it is printing but the pages are blank.  The ink cartridges are new and the print head (?) goes across the page like it is printing.  The printer is an hp psc 2175 and I am using windows 7.  The last thing I did on this printer before it would not print/copy was to scan several documents using Windows Live Photo Gallery and this scanned correctly.  What can I do to get it to print/copy again?
    Thanks!
    This question was solved.
    View Solution.

    When the printer is not printing black ink and printing out blank sheets ... beware the cartidge sometimes does not insert in proper alignment even though you hear the click. Look closely at the cartridge after you insert it. Make sure it is not slightly tilted. And make sure it is dead center, not further to one side than the other because it will not make proper contact. Also 2 more good suggestions here... http://h30434.www3.hp.com/t5/Ink-Toner-Cartridge-Printhead/HP-Officejet-6500-Wireless-will-not-print...
    PS- the HP 1210 will print without the color cartridge installed!
    Also it is not that hard to refill cartridges yourself. Look how much ink you get for so cheap... http://www.amazon.com/gp/search?ie=UTF8&tag=ie8search-20&index=blended&linkCode=qs&camp=1789&creativ...
    --ThatPat

  • Time Intelligence DAX functions are not working in Tabular model

    Hello,
    I've implemented a simple tabular model using SQL Server 2012 SP1 SSDT with a date dimension that  has an active relationship with the date key in the fact table and has met the criteria for a date dimension to the best of my knowledge, i.e. no missing
    dates, etc.
    However, when I add a calculated measure in the VS project using any time intelligence function, i.e. =CALCULATE(SUM([NewPatientTotal]),TOTALYTD(DimDate[Date])), the calculated measure only returns the value of the current member, i.e. SUM(NewPatientTotal])
    without throwing an error.  This is happens for all time intelligence functions!
    Are there any best practices that I've missed? I've scoured the SSAS forums to no avail.
    Thanks,
    Ben
    Ben Lezin

    You probably forgot to use the "Mark as Date Table" on the DimDate table.
    Marco Russo (Blog,
    Twitter,
    LinkedIn) - sqlbi.com:
    Articles, Videos,
    Tools, Consultancy,
    Training
    Format with DAX Formatter and design with
    DAX Patterns. Learn
    Power Pivot and SSAS Tabular.

  • Pass Prompt values into Legend / '-ALL-' filter filters out all records

    Hi
    I have 2 questions for the same chart so I hope it's OK to add them in one post.
    Firstly I have created a chart & added three Select List filters which work fine, the query is below, problem is that when I change back to '-ALL-' I get no data, it has filtered out all records as no data matches the value of '-ALL-' does anyone know the code to get around this?
    My chart query;
    select null link, P_MONTH AS MONTH, SUM(CALLS) AS data
    from DATA.MAIN_DATA
    WHERE WAREHOUSE = :P1_WAREHOUSE
    AND ANS_UNANS = :P1_ANS_UNANS
    AND PRODUCT = :P1_PRODUCT
    GROUP BY P_MONTH
    As I will have several queries like the one above for different options on the same chart, I would like the Legend to show what the user has chosen each time the options are changed ie;
    Something like the bolded text in the query to display the chosen values in the legend;
    select null link, P_MONTH AS MONTH, SUM(CALLS) AS 'P1_WAREHOUSE' || 'P1_ANS_UNANS' || 'P1_PRODUCT'
    from DATA.MAIN_DATA
    WHERE WAREHOUSE = :P1_WAREHOUSE
    AND ANS_UNANS = :P1_ANS_UNANS
    AND PRODUCT = :P1_PRODUCT
    GROUP BY P_MONTH
    Any ideas/suggests?

    Thanks Andy
    I'm having some problems with applying this so it may be best if I show you how I've applied this code.
    Here's an example of my data on a made up 'EMP' table;
    ENAME     SAL     DEPTNO     DEPARTMENT
    SMITH1     1871     345     DEPT1
    SMITH2     1953     345     DEPT2
    SMITH3     2239     345     DEPT3
    SMITH4     492     345     DEPT4
    SMITH5     2431     345     DEPT5
    SMITH6     2331     345     DEPT6
    SMITH7     1003     369     DEPT7
    SMITH8     1688     370     DEPT8
    SMITH9     2284     371     DEPT9
    So I'm only using one table - 'EMP'
    I've created 2 LOVs, 'DEPTNO' & 'DNAME'.
    'DEPTNO' LOV has the values for the 'DEPTNO' field in the table.
    'DNAME' LOV has the values for the 'DEPARTMENT' field in the table.
    I then created a chart with the below SQL query as its source;
    SELECT NULL LINK,ENAME LABEL,SAL VALUE
    FROM EMP
    WHERE (DEPTNO = :P1_DEPTNO OR :P1_DEPTNO = 0)
    ORDER BY ENAME
    The 'Chart Title' field under the 'Chart Attributes' tab has the below added;
    Department - &P1_DNAME.
    The COMPUTATION is as below;
    SLECT NVL(DEPARTMENT, '-ALL-')
    FROM EMP
    WHERE DEPTNO = :P1_DEPTNO
    Could you advise where I may be going wrong as I have the following errors;
    1. The chart is working OK with the added '(DEPTNO = :P1_DEPTNO OR :P1_DEPTNO = 0)' clause - but I still get no results for '-ALL-'
    2. I can't get the chart to display the current value in the legend - where exactly should I put this line - 'Department - &P1_DNAME.'
    3. The Computation is stopping any data from showing in the chart

  • Need help on filtering out one record from a report and open in new page

    Hi I am new and embarrassed to write in the forum asking silly questions. Thing is I am learning all from scratch without help from anyone. I have created a database (have previous knowledge only from Access) and have managed to create a beautiful report from a search filter. This report lines up several records matching what I needed. Now, I want to make the whole report with hyperlinks to a detailed page on each of the records in the report. I have tried using the feature where one can make one column hyperlinked and redirect to a new page, where I am getting all the records again - instead of only getting the record I am clicking on. I have looked and looked in the forums without finding solution and I have tested and tried various methods without luck. I am suspecting that I need some sort of knowledge on how to write a select query with where conditions that can apply to filtering out a record from one report to get another detailed on only one object (i.e. record). :/ Stupid or what?

    Hrefna.
    What you need to look into is two things:
    1) The link you defined, needs to set additional attributes for the target page. In the "Column Link" box, you have set the link to "Page in this Application" and followed by the page number (let's say, Page 10). Below that, you should set an Item to an item on you target page (let's call that P10_PRODUCT_ID). This item should be the primary key of your detail table (on the targe page). You can select this item from the popup list. The Value of the item should be picked from a popup list as well, being the value from the record you clicked on. This should then transfer your selected item to your page. The URL will then have something like P10_PRODUCT_ID:5 at the end.
    2) On the target page, 10, you must change the query slightly, so that it adds a WHERE clause:
    WHERE PRODUCT_ID = :P10_PRODUCT_ID
    Now, you should be set.
    Hope this helps.
    Borkur

  • Time Zone Conversion with out using function and with out alter

    Hi All,
    I am able to see 1Hr difference in my date fields of SQL output because in UI (User Interface)  date field was stored in BST format but DB time zone is in GMT format so can any one help me to find a solution for 1 hr difference, here i don't have Privileges to alter DB time zone and i couldn't use function as i have so many SQL's and  can't apply that function manually. SO is there any other option to change the DB time zone with out alter it and with out using function.
    Thank you Very Much.

    Hi,
    you need to set time zone in your session, let's do an example :
    alter session set nls_date_format='DD/MM/YYYY HH24:MI:SS';
    CREATE TABLE USERA.T
      SDATE       DATE                              DEFAULT sysdate,
      WITHOUT_TZ  TIMESTAMP(6)                      DEFAULT sysdate,
      WITH_TZ     TIMESTAMP(6) WITH TIME ZONE       DEFAULT sysdate,
      WITH_LZ     TIMESTAMP(6) WITH LOCAL TIME ZONE DEFAULT sysdate
    insert into USERA.T(sdate) values(sysdate);
      commit;
      select * from USERA.T;
    SQL> select * from system.t;
    SDATE
    WITHOUT_TZ
    WITH_TZ
    WITH_LZ
    26/09/2013 11:04:23
    2013-09-26-11.04.23.000000
    26/09/13 11:04:23,000000 +00:00
    2013-09-26-11.04.23.000000
    SQL> alter session set TIME_ZONE ='-7:0';
    Session altered.
    SQL> select * from system.t;
    SDATE
    WITHOUT_TZ
    WITH_TZ
    WITH_LZ
    26/09/2013 11:04:23
    2013-09-26-11.04.23.000000
    26/09/13 11:04:23,000000 +00:00
    2013-09-26-04.04.23.000000

  • Difference between zero and blank values

    Is there a way for the system to determine the difference between zero and blank values. One can have a zero allowed for the 0 value to actualy be there in the KF but is there a way that a macro can be written by which we can use the differentiation between the zero ( a value) and blank (no value) in the KF
    I have tried to look for an explanation on the service.sap.com and sdn but was not able to find anything.
    Thanks in advance

    Thanks for your reply. You mentioned something about the "fixing" setting that could make the "0" displayed in the planning book. Could you elaborate?
    Also, in the post from user "APO APO" on 5/8, the author seemed to indicate they could see the "0" in the planning book, as quoted below:
    "I have already made the zero allowed arrangement for that in the planning area and can see the 0 values in the planning book but I am not being able to make the macro get the results."
    I just want to find out if there is any way the user can visually distinguish b/w the "0" and blank values. If not, it'll be very confusing to the users. I understand the macros can distinguish b/w them.
    Thanks in advance.

Maybe you are looking for

  • "homemade" tones not liked by iTunes on new computer

    I am not sure which forum this needs to go in, but since it is a question regarding ringtones downloaded to iTunes, I figured I would start here. So anyway, here’s my situation (Hang with me here - I am big on details, especially when it comes to hel

  • How can I get my bookmarked sites to open in a new tab by clicking on them, like the old Netscape?

    Every time I click on a bookmark, it overrides the current tab. How do I get it to open in a new tab? Or at least have an option like the old Netscape used to do.

  • Transaction Launcher to launch a ABAP report

    I have to assign a SAP CRM ABAP report to Web UI. I am trying to create a Link using Transaction Launcher and in "Enter Further Technical Details" trying to use BOR Type as "ZTSTC"  and assign it Method "Execute" which i cannot find. SAP IMG help dir

  • Can't connect using wpa_supplicant [SOLVED]

    When I was first setting up (latest netinstall iso, x86_64) I was using wpa_passphrase and wpa_supplicant just fine in fetching new packages and the like. I did this about 2 weeks ago (Jan 27). Some time ago when I updated and restarted, I noticed th

  • UTA for SSAS project

    I have UTA for Datawarehouse and Mart. I'm looking to have UTA done for Cube and would want to compare the results in Mart (SQL queries) and Cube (MDX queries). Have anyone tried doing this? If yes, pls throw some light. Thanks! DS