Display result in two different columns of crosstab by two date parameters.

Muhammad Waqas
edited February 11, 2022 in Analytics #1
<p>Hi,</p>
<p> </p>
<p>When i run my report by sending two different reports. If parameters date are same it displays same result in two different columns of crosstab or table. If dates are change it display 0. I want to display result of different dates in two different columns in crosstab or table.</p>
<p> </p>
<p>Report Attached.
Warning No formatter is installed for the format ipb

Comments

  • <p>I can't run your report without the data and drivers but I think I can see what you are trying to do.  You should create a new Data Cube, but use a Date field from your CR Data Set to create a new Group Dimension... when you do this, an extra dialog pops up so you can select that you want it grouped by month, year, week, etc... then Count your COMP_TICKET_NUM like you were as a Summary Field in the Data Cube.</p>
    <p> </p>
    <p>Now, once you create a new Cross Tab, drag your date group into the column area, and your count into the center summary area.  This will display one new column for each period like month, for example.</p>
    <p> </p>
    <p>Use your parameters in the Data Set query to filter what the crosstab displays.</p>
    Warning No formatter is installed for the format ipb
  • <p>After I posted this I read your original question and maybe have a different idea of what you are asking. If you want to decide, based on parameters, whether data should appear in column 1 or column 2, or more or a crosstab...that is also possible.  I would do this in the Data Set.  Create a new Computed Column.  Here you can create a new field in the expression builder with script that has access to the parameters.  You can check your parameters and leave a 1 or 2 in this field... Now, once you create a new crosstab, use the new field as a column dimension and you will get as many different columns as you have unique values in this new field.</p>
    Warning No formatter is installed for the format ipb
  • <p>Can you make small example please? I don't understand what to write in script at computed column.</p>
    Warning No formatter is installed for the format ipb
  • <p>An example showing both approaches I mentioned above is included.  One crosstab is automatically split by month.. The other cross is split by a custom script in the Data Set's Computed Column area.  My script is just looking at a passed in date parameter but here you write whatever logic makes sense comparing as many date parameters as you want.</p>
    Warning No formatter is installed for the format ipb
  • <p>I think you didn't understand my problem. Let me clear it more.</p>
    <p> </p>
    <p>I'm sending <strong>2 </strong>different dates from <strong>2 </strong>report parameters <strong>txtFirstDate</strong> and <strong>txtSecondDate</strong>. In first column of crosstab it should display measure of <strong>row["COMP_TICKET_NUM]" </strong>from date send by first paramter <strong>txtFirstDate. </strong>And in second column of crosstab it should display measure of same <strong>row["COMP_TICKET_NUM]" </strong>from different date send by second paramter <strong>txtSecondDate.</strong></p>
    Warning No formatter is installed for the format ipb
  • <p>Just displaying 2 different dates in a crosstab is even easier, you just create a crosstab grouped by your date field, then set a filter on the crosstab that matches your two passed in dates.</p>
    <p> </p>
    <p>
    Warning No formatter is installed for the format ipb
  • <p>Solved. Thanks for the help  :)</p>
    Warning No formatter is installed for the format ipb