How to make a report to display next 18 months of data with when user select a particular month from the filter in power pivot tabular model.

Hi,
i have a  dimension table  with month_key having values (201201,201202,201203.......202011,202012) and month name ( Jan 12, feb 12,......NOV 20, Dec 20)  and a fact  table with columns (month_key ,measure_types, Amount)
My requirement is to create a power pivot report  in which when a user select a month from the filter, the report should display the (selected month+18 ) month's data against each type . when JAN 12 is selected ,the jan 2012 +18 = june 2013
, month name should be populated with months till june 2013 only .
i tried creating calculated column"END DATE " in the fact table with  dax expression to calculate the 18th monh from the current month  as below 
month_key END DATE
201201       201306    
201202       201307      
and thought of filtering the table with month key <= ENDDATE but it is not working as expected. could you please guide me on this ? Is there any time intelligence function that serve the purpose . Iam using  excel 2010
..hence could not do any calculation on the report side also. please suggest .
Thanks in advance                                                                                                                                               

Do you need to show the measure calculated for those 18 months as a total on 1 row, or do you need to select a single month and then display on row filters 18 distinct rows?
The first is trivial as driezl has suggested.
The second will require a second calendar table.
I created this example workbook for a coworker who had a similar problem. You will have to use the disconnected table as your filter and pull your related table onto the rows.
Finally, the easiest way to deal with the sort of date arithmetic you need to do is to restructure your date table to have a series of "Sequential" fields. These fields should be the number of units of time since the beginning of your calendar.
For example, consider a calendar starting on January 1, 2010. For January - December 2010, [MonthSequential] = 1, 2, ..., 12. For January - December 2011, [MonthSequential] = 13, 14, ..., 24, and so on, incrementing by 1 for each sequential month in time.
Assuming you have this set up in your date tables (one related to your model - DimDate - and one disconnected - DisconDimDate) your measure would look like this:
18 Month Measure:=
CALCULATE( [Measure]
, FILTER( DimDate
, DimDate[MonthSequential] >= MAX( DisconDimDate[MonthSequential] )
&& DimDate[MonthSequential] <= MAX( DisconDimDate[MonthSequential] ) + 18
Please review this example along with the workbook I have linked above.

Similar Messages

  • Displaying internal table fields data based on user selection

    Hi all,
    I am having a checkbox for each field in the internal table.
    and i only have to display the fields of the internal table which the user has selected based on the check boxes provided.
    Could you plz help me out, how can i display the data of only those fields which the user has selected initially.....
    Thanks,
    anil.

    Hi,
      This is not the best solution but this can be one solution.
    Check this code
    REPORT z_sdn.
    PARAMETERS:
      p_kunnr AS CHECKBOX DEFAULT 'X',
      p_land1 AS CHECKBOX,
      p_name1 AS CHECKBOX.
    DATA:
      BEGIN OF fs_tab,
        kunnr     TYPE kunnr,
        land(10) TYPE c,
        name(10) TYPE c,
      END OF fs_tab.
    DATA:
      t_tab LIKE
      TABLE OF
            fs_tab.
    START-OF-SELECTION.
      CLEAR fs_tab.
      fs_tab-kunnr = '001'.
      fs_tab-land  = 'Land1'.
      fs_tab-name  = 'Name1'.
      APPEND fs_tab TO t_tab.
      CLEAR fs_tab.
      fs_tab-kunnr = '002'.
      fs_tab-land  = 'Land2'.
      fs_tab-name  = 'Name2'.
      APPEND fs_tab TO t_tab.
      IF p_kunnr = 'X' AND p_land1 IS INITIAL AND p_name1 IS INITIAL.
        WRITE: / 'KUNNR:'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-kunnr.
        ENDLOOP.
      ENDIF.
      IF p_land1 = 'X' AND p_kunnr IS INITIAL AND p_name1 IS INITIAL.
        WRITE: / 'LAND:'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-land.
        ENDLOOP.
      ENDIF.
      IF p_name1 = 'X' AND p_kunnr IS INITIAL AND p_land1 IS INITIAL.
        WRITE: / 'NAME:'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-name.
        ENDLOOP.
      ENDIF.
      IF p_kunnr = 'X' AND p_land1 = 'X' AND p_name1 IS INITIAL.
        WRITE: / 'KUNNR:',
                 'LAND'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-kunnr,
                   fs_tab-land.
        ENDLOOP.
      ENDIF.
      IF p_kunnr = 'X' AND p_name1 = 'X' AND p_land1 IS INITIAL.
        WRITE: / 'KUNNR:',
                 'NAME'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-kunnr,
                   fs_tab-name.
        ENDLOOP.
      ENDIF.
      IF p_name1 = 'X' AND p_land1 = 'X' AND p_kunnr IS INITIAL.
        WRITE: / 'LAND:',
                 'NAME:'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-land,
                   fs_tab-name.
        ENDLOOP.
      ENDIF.
      IF p_name1 = 'X' AND p_land1 = 'X' AND p_kunnr = 'X'.
        WRITE: / 'KUNNR',
                 'LAND:',
                 'NAME:'.
        LOOP AT t_tab INTO fs_tab.
          WRITE: / fs_tab-kunnr,
                   fs_tab-land,
                   fs_tab-name.
        ENDLOOP.
      ENDIF.
    Regards
    Abhijeet

  • How to develop a report for display unused materials

    how to develop a report for display unused materials? where can i find them?

    Hi Phani,
    I didnt get what u acually mean by unsued material. These are some sample materail types which u can find in table 'Mara'  field 'Mtart'.
    ABF  Waste                   
    AEM  Samples                 
    BLG  BLG Empties  External   
    BLGA BLGAEmpties  Fixed assets
    CH00 CH Contract Handling    
    COMP Prod. alloc., purchased 
    CONT KANBAN Container        
    COUP Coupons                 
    DIEN Service                 
    DOCU documentary batch       
    ERSA Spare parts             
    FERT Finished product(fert)  
    FGTR Drinks                  
    FHMI Prod. resources/tools   
    FOOD Foods (excl. perishables)
    FRIP Perishables             
    GR01 material type 01        
    GR02 material type 02        
    HALB Semi-finished product   
    HAWA Trading goods           
    HERS Manufacturer parts      
    HIBE Operating supplies      
    IBAU Maintenance assembly    
    INTR Intra material          
    KMAT Configurable material   
    LEER Empties                 
    LEIH Returnable packaging    
    LGUT Empties (retail)        
    MODE Apparel (seasonal)      
    NLAG Non-stock material      
    NOF1 Nonfoods                
    PIPE Pipeline material       
    PLAN Trading goods (planned) 
    etc.
    ex:
    select * from mara where mtart = 'ABF'.
    Regards,
    Kiran B

  • How to make slow reports fast?

    Hi all,
    How to make slow reports fast? What could be the various reasons and optimizations/solutions?
    Thanks,
    Charles.
    ++++++++++++++++++++++++++++++

    Its an on going process. Couple of steps you will have to follow: Did you perform any SQL trace ..?
            Did you perform any ABAP trace...?
            How much business data these reports are processing.Is there a possibility you can do some changes.
    SQL Trace ( SAP in built tool) will give you a fair idea about each and every SQL statements in your report. And you can anlyze bad ones. And also propse optimized SQL or
    index if needed.
    ABAP Trace(SAP in bulit tool), you can find out amount of ABAP run time thats being elapsed by each and individual abap module.
    Also the amount of business data is every  important. While designing the report alogorithm this is very important factor.

  • How to make WebView able to display Tamil language

    Dear JavaFX users,
    We have written a simple web browser based on WebView. On Windows 7, it works well, can display Arabic but cannot display Tamil language
    The font Arial Unicode MS is available and with shape TAMIL, and it's possible to display Tamil text in Swing controls but not in JavaFX WebvView !
    I thought that WebView was Unicode UTF-8. How to make WebView able to display Tamil language.
    Thank you in advance for any help on this issue.
    Best wishes,
    Jean-Claude Dauphin

    For thus who are interested, please find below the Oracle response on this issue:
    WebView uses the default JavaFX graphics pipeline, which is different than the one used for Swing/AWT. Support for right to left languages and complex characters is only planned for JDK 8 (JavaFX 8), but an early access implementation should soon be available as part of the JDK 8 weekly builds at http://jdk8.java.net/downloads.html
    Whatever support for Arabic existing in JavaFX 2.2.x is not complete, and I would not recommend that you rely on it in "production" mode.
    Regards,
    Nicolas Lorain
    Oracle
    Java Client Product Management

  • How do I get Contacts to display yyyy-mm-dd date format?

    How do I get Contacts to display yyyy-mm-dd date format?

    This works in Microsoft Outlook, but not sure if it works in Apple Contacts.
    In System Preferences > Date & Time select Open Language & Region.
    Click on Advanced
    Under the Dates tab you can customize settings.
    You might need to restart your Mac after making the settings.

  • How do I disconnect or "eject" my Thunderbolt display when I take my MBA away from the desk?

    How do I disconnect or "eject" my Thunderbolt display when I take my MBA away from the desk?

    Pretty much. You need to eject all external drives that are connected to the TB display from within OS X before you disconnect the TB display otherwise OS X will give you the "drive was not ejected properly" error.
    If you just pull out the TB cable it's like disconnecting the drives USB cable direct from the Mac.

  • How to make 2 clients on same VLAN communicate to each other when tunnel-loop-prevention is enabled?

    Requirement:
    How to make two clients on same VLAN communicate to each other when tunnel-loop-prevention is enabled on tunneled-node configuration at controller?
    Whenever we enable tunnel-loop-prevention on controller while we configure tunneled-node, the communication between two tunneled-node client on same VLAN is blocked or dropped.
    If the tunneled-node clients are of different VLANs then they can communicate between them even when the tunnel-loop-prevention is enabled on the controller.
    Solution:
    To make two tunneled-node client on same VLAN to communicate between them, we need to enable "local-proxy-arp" for the interface VLAN on the controller.
    Once it is enabled now the tunneled-node clients on same VLAN can communicate between each other. 
    Configuration:
    To enable "local-proxy-arp":
    Get to the interface of the VLAN on the controller
    Example :
    (config)#interface vlan 5
    (config)#ip local-proxy-arp
    To enable tunnel loop prevention on controller
    (config)# tunnel-loop-prevention
    Verification
    Show commands:
    To check if tunnel-loop-prevention is enabled or disabled
    #show tunneled-node config
    Tunnelded node Server: Enabled
    Tunnel Loop Prevention: Enabled
    To check if local-proxy-ap is enabled:
    #show interface vlan 5
    Look for in the output "ProxyARP enable"

    streetfi8er wrote:
    Server ready,waiting for client:
    Exception in thread "New THREAD" java.lang.NullPointerException
         at server4$server4Thread.run(server4.java:88)
    Failed to accept client
    when i run the second client programme on different a console in the same system i get the error that:
    Unknown HostOK, I'm no socket programming expert; but I can see a few potential problems with what you've written.
    1. First off, which line is line 88? Line numbers would be useful. Also, indenting your code properly would make it easier to read.
    2. Your 'while(!str.equalsIgnoreCase("close"))' will always fail with a NullPointerException because 'str' is initially set to null.
    3. Your 'while(true)' loop worries me. How does it exit? Relying on an exception is usually very bad practise.
    4. You are not handling SecurityExceptions. While it's unlikely to happen on your machine; it could easily happen on another.
    5. It might be worth indicating the actual exception thrown in your "Failed to accept client" message. accept() can throw three different types of IOException.
    6. All the threads you create will be called "New THREAD", which doesn't provide much value.
    HIH
    Winston

  • I wanted to know how to unlock my iphone, since I had to restore it and when it restarted, it appeared this message: "The SIM card que you currently have installed in this iphone is from a carrier that is not supported under the Currently actuvation polic

    I wanted to know how to unlock my iphone, since I had to restore it and when it restarted, it appeared this message: "The SIM card que you currently have installed in this iphone is from a carrier that is not supported under the Currently actuvation policy that is assigned by the server activion. this is not a hardware issue with the iPhone. Please insert another SIM card from a supported carrier or request que this iphone be unlocked by your carrier. Please contact Apple for more information. "
    I need help, I use my phone for everything enclusive to work. I appreciate if you can help. I'm from Brazil. My name and giullia.

    Did you purchase this device from Apple or an authorized reseller? It sounds as if you had a device that was jailbroken/hacked to operate on your carrier. Upon updating the iOS, it is now locked back to the original carrier the device was locked to.
    Only the carrier the device is locked to can authorize an unlock. You will need to make contact with that carrier and see if they provide unlocking services, and if they do, if you qualify for an unlock. Otherwise, you are out of luck. One that carrier can take care of the unlocking.

  • How do i select a particular cell from a AbstractTableModel?

    I m using abstractTableModel to create my table. My table display 4 columns of different info, now i can capture my info from the other window and compare the value with my table but i don't know how to highlight/or select the particular rows in table.

    Hi,
    as I said before, the changeSelection(...) method of JTable will setup it's ListSelectionModel so that the row, you want, gets selected/highlighted:
    yourTable.changeSelection(row,0,false,false);
    will select a certain cell - but if selection of a single cell is not allowed and row selection is allowed, the whole row will be selected this way. You can allow selection of a single cell, selection of a column, selection of a row, or simultaneous selection of column and row at the same time. You can have single selection and multi selection.
    Hope this helps
    greetings Marsian

  • In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms

    In AP invoice i need to make "Terms date " field to calculate the date automatically when i select the payment terms.
    How can i do this?

    Hi,
    You can select the Payment Term at PO Header Level.
    When you book an invoice, that Payment Term will automatically defaulted to Invoice.
    You can define Payment Term in AP.
    Payment terms have one or more payment terms lines, each of which creates one scheduled payment. Each payment terms line and each corresponding scheduled  payment has a due date or a discount date based on either a specific day of a month, such as the 15th of the month, or a number of days added to your terms date, such as 14 days after the terms date.
    Payment Terms (Oracle Payables Help)

  • How to populate date & time when user enter data for custom table in sm30

    Can anyone tell me How to populate system date & time when user enter data for custom table in sm30..
      Req is
      i have custom table and using sm30 user can enter data.
    after saving date i want to update date & time in table
    Pls let me know where to write the code?
    Thanks in Advance

    You have to write the code in EVENT 01 in SE54 transaction. Go to SE54, enter your Ztable name and in the menu 'Environment-->Events'. Press 'ENTER' to go past the popup message. In the next screen, click on 'New Entries'. In the first column, enter 01 and in the next column give some name for your routine(say UPDATE_USER_DATE_TIME). Then click on the souce code icon that appears in blue at the end of the row. In the code, you need logic like below.
    FORM update_user_date_time.
      DATA: f_index LIKE sy-tabix.
      DATA: BEGIN OF l_total.
              INCLUDE STRUCTURE zztable.
      INCLUDE  STRUCTURE vimtbflags.
      DATA  END OF l_total.
      DATA: s_record TYPE zztable.
      LOOP AT total INTO l_total.
        IF l_total-vim_action = aendern OR
           l_total-vim_action = neuer_eintrag.
          MOVE-CORRESPONDING l_total TO s_record.
          s_record-zz_user = sy-uname.
          s_record-zz_date = sy-datum.
          s_record-zz_time = sy-uzeit.
          READ TABLE extract WITH KEY l_total.
          IF sy-subrc EQ 0.
            f_index = sy-tabix.
          ELSE.
            CLEAR f_index.
          ENDIF.
          MOVE-CORRESPONDING s_record TO l_total.
          MODIFY total FROM l_total.
          CHECK f_index GT 0.
          MODIFY extract INDEX f_index FROM l_total.
        ENDIF.
      ENDLOOP.
    ENDFORM.                    " UPDATE_USER_DATE_TIME
    Here ZZTABLE is the Z table and ZZ_USER, ZZ_DATE, and ZZ_TIME are the fields that are updated.

  • If you right-click an image you can select to "Block Images" from the site, but how do you reverse this choice?

    If you right-click an image on a web page you can select to
    "Block Images from [the url of the site]".
    This works well, particularly to make the page printer-friendly, but how do you reverse this choice to see the images again?

    You can see all permissions for the current page in Tools > Page Info > Permissions
    If it is from a different domain then use this:
    *A way to see which images are blocked is to click the favicon (<i>Site Identification</i> icon) on the left side of the location bar.
    *A click on the "More Information" button will open the Security tab of the "Page Info" window (also accessible via "Tools > Page Info").
    *Open the <i>Media</i> tab of the "Page Info" window.
    *Select the first image and scroll down though the list with the Down arrow key.
    *If an image in the list is grayed and there is a check-mark in the box "<i>Block Images from...</i>" then remove that mark to unblock the images from that domain.

  • I have an ipad  and a iphone 5, when i start find mi iphone from the ipad or in the iphone only display the iphone, but not mi ipad it displays with conection, ubication not avaliable, i configure the same apple id in bot devices, and a diferent apple id

    i have an ipad  and a iphone 5, when i start find mi iphone from the ipad or in the iphone only display the iphone, but not mi ipad it displays with conection, ubication not avaliable, i configure the same apple id in bot devices, and a diferent apple id, can help me?

    IOS: using facetime http://support.apple.com/kb/ht4319
    using an ipad will use the email address since you can't make a phone call.  see the link.
    Your basically calling/emailing yourself that's why your getting a busy signal.

  • I have applied the icloud on my sisters id accidently. How can I no w remove this information and set up my own Icloud on another computer with out loosing either of our information from the phone

    I have applied the icloud on my sisters id accidently. How can I no w remove this information and set up my own Icloud on another computer with out loosing either of our information from the phone.

    Please read before going through with this procedure.
    If you really want your contact back and you did not do another iCloud backap since you deleted some of your contacts, you can do a hard reboot on both devices with iClouded contacts by holding down the home and lock buttons on each of them for 10 seconds ignoring the slide to turn off thing. Make sure you have iCloud contact services off before doing so. You can then go through the whole set up process until you get up to the backup part. You then press to restore from an iCloud backup (make sure you choose the right backup for the right phone). If you didn't make an iCloud backup before the contact incident, you will have to use your two-month-old iTunes backups. Each phone should have their contacts the way they were from your last backup. You then go into Settings>iCloud>and turn off contacts. You then can choose if you want to keep your current contacts or not. Turn this off on both phones just incase you add another iCloud device to the mix later on. Now your contact lists are no longer linked (Caution: side effect may include lack of edit button). You may now add and delete contacts as you please without it happening on your other phone.
    Thank you for choosing Apple.

Maybe you are looking for

  • IPhone, calender, iCal, mail.app: probem inviting people to meeting

    Hi everyone, last night I downloaded the 3.0 Version. Everything runs fine but... I tried the new feature to invite people to appointments in calender. On the first sight everything works fine. But then there where Problems. My colleague received my

  • Simple Java Question (Hopefully)

    I'm not sure if anyone out here is familiar with ClearCase, I'm sure there are some, but I am trying to create some basic classes that perform various cleartool shell out commands, one of which returns the some information about ClearCase code reposi

  • Scheduling agreement without usage in MRP / MD04

    Hello, i want to use a scheduling agreement which isn't relevant for MRP. I use the standard agreement type LPA (Scheduling Agreement). The storage location for this process is marked as u201Cstock excluded from MRPu201D and the Source list record is

  • I have purchased a new laptop and want to move my itunes music and maintain my playlists from the old desktop to the new laptop.

    An additional complication is that on the old desktop I have music in 2 locations, both on C: drive and F: drive that I would like to combine all to one location now and still maintain my playlists. I may need to do this first on the old desktop befo

  • ⌘-L: what does it do?

    How can I find out what certain keystrokes do in Mail? I pushed "⌘-L" [command-L] while a message subject was highlighted and it disappeared - where did it go? Thanks to any keyboard stroke gurus!