5 Replies Latest reply: May 22, 2013 5:33 AM by tonyfree RSS

    Limit Dimensions in graph

      Dear,

       

      I have 2 problems:

       

      -1) The first one: I would like to limit the dimension in my graph

           For exemple, I've

          

      |  Period    | Unit          | Sales|

      |  01 2013  | Volume     |    10 |

      |  01 2013  | Revenue € | 150€|

      |  02 2013  | Volume     |   25€|

      |  02 2013  | Revenue € | 375€|

       

      I would like to do a graph just on Volume.

      So I need to put a "Unit" Filter just on this graph (not in the global filter).

       

      Do you know  how I can do that ?

       

      -2) The other graph problem:

       

      On a pie chart I would like to represent just the last record of the selected period.

       

      Exemple: I would like to shaw on the pie chart (to describe the part of each product) , the quantities sold of the last periode (if january to december is selected, just shaw the split on december).

       

       

       

      Thanks

       

      Tony

        • Re: Limit Dimensions in graph

          Hi Tony

           

          For item 1.

          Your current expression will be something like: Sum(Sales), in order to give you only Volume change the expression to Sum({<Unit={'Volume'}>} Sales)

           

           

          Not sure about item 2, to get a response on that, add another entry into the forum just for that problem, I'll have a think about it but really not sure at the moment.

           

          Cheers,

          Nigel.

          • Re: Limit Dimensions in graph
            Michael Solomovich

            About #2.

            If Period is formatted as dual, that is it has numeric equivalent, this expression will work

            sum({<Period={"$(=max(Period))"}>} Sales)

             

            Regards,

            Michael

              • Re: Limit Dimensions in graph

                Thanks at all.

                 

                And if the period is not numeric but I have two colomuns with in the first one "Year" and in second " Quarter" like:

                | Year |Quarter | Period   |Unit | Sales|

                | 2012|    1      | Q1 2012|  10  | 50    |

                | 2012|    2      | Q2 2012|  15  | 75    |

                | 2011|    1      | Q1 2011|  4    | 20    |

                How can I do ?

                 

                Cheers,

                 

                Tony

                  • Re: Limit Dimensions in graph

                    Hi Tony

                     

                    The easy way is to use Michael's suggestion above.

                     

                    You are saying that period is not a numeric, but you can adjust this in the load script by using the DUAL function so that QlikView displays text but treats the column as numeric.

                     

                    At the moment you probably have something like

                     

                    Load Year, Quarter, Period FROM YourCalendarTable;

                     

                    Change this to something like:

                     

                    Load Year, Quarter, DUAL(Period, Year + (Quarter * 10000)) as Period FROM YourCalendarTable;

                     

                    This will change the period to a numeric value for the purposes of sorting etc but will still display the text values you want in a chart.

                     

                    Regards,

                    Nigel.