Pivot card

Hi,

I would like to know about Pivot card.

I prepared the table below.

The four fruits of "Product" have a value in Jan, but only grapes does not have a value in February.



I visualized this data on a Pivot Table card by analyzer.

Is it possible to put the name in product in order as I like?


If I visualize only February on pivot card, Grape will disappear from the Product column. Is it possible to display Grape as it is without disappearing even if only February is displayed?

Thank you.

Comments

  • @eriena You could create a beast mode so calculate the sum of pcs for each product to make sure that every product is visible in the table.

    For example you can create a Beast Mode called "Apple":

    sum(case when `Product` = 'apple' then `pcs` else 0 end)
    

    And this Beast Mode called "Grapes":

    sum(case when `Product` = 'grape' then `pcs` else 0 end)
    

    That way, even if there is no data for grapes in February it will still show 0.

  • Hello @amehdad , @MichelleH,

    Thank you for your advice and the information.

    I could solve my question. I appreciated for your answers.

    (I think I should have select new post as "ask a question" but I think I selected "new topics", so I couldn't find "accept" button to your advice. I 'm sorry for that.)

  • Hi, @amehdad , @MichelleH

    Please let me ask additional question.

    I set chart property option as "fill empty data cells with 0" on my chart.

    I could let show "0" when it is null.


    But when I filter only Feb 2021, grape disappear from chart.

    Do we have any method to show grape on the chart when even it filtered?

  • Hi @eriena

    You'd need to generate Grape rows with 0 as the number of pieces for each date. To do this you'd need to do a cartesian join between your dates and your products. This can cause a massive increase in the number of records you have in your dataset so be mindful it will increase the dataflow execution time as well.

    First, select just the product names / identifiers, feed that into a remove duplicate, then put that into an Add Constant tile to add a new column called "Join Column" with a value of 1.

    Next you could either pull in the Date Dimension from the Domo Dimensions connector to get a list of all date then filter to be greater or equal to your lowest date and less than the current date (reduces dataset size). OR you could select all your distinct dates from your dataset like the previous step (the caveat to this is that if you don't have a date in your dataset it won't put a grape record for that date). If you don't need the data on a daily method then I'd recommend grouping your data by month and using the month to join on instead of the date. Feed that into an Add Constant tile and add a new join column called "Join Column" with a value of 1.

    Join the two datasets together. This will list all products and all dates. Do a left join with this as your left table and your original dataset as the right table. Then you can use a formula tile and use the COALESCE function to default the value to 0. Finally output this all to an output dataset.

    **Was this post helpful? Click Agree or Like below**
    **Did this solve your problem? Accept it as a solution!**
  • @GrantSmith

    Thank you for your advice.

    Oh, I should have modified the dataset prior to creating card.

    I understood, I will try modified my dataset first.

    I am appreciated your advice, thank you so much☺️