4 Replies Latest reply: May 18, 2018 4:39 PM by David P RSS

    Count(TOTAL <[Master Dimension]> Product)

    David P

      If possible can someone point me at documentation explaining why this works even though there is an error in the expression editor?

       

      Given that I have a master dimension as "Master Dimension"

       

      The measure for my chart is:

      Count(Product)/Count(TOTAL <[Master Dimension]> Product)
      

       

      I get this error

      Bad field name: [Master Dimension]

       

      But the the chart still renders and saves normally.

       

      My chart has two dimensions the first is "Master Dimension" and the second is "Product". For a Customer each Product should have it's own bar in the chart. The bar represents the percentage of time that product appears for that customer. For Astrida AA appears twice and she has 3 product rows so that's 66.7%. The graph displays as expected but I can't explain why.

       

      I've attached a simple app. That demonstrates the issue. Here is the load script if needed.

       

      ProductData:
      LOAD * inline [
      Customer|Product|UnitSales|UnitPrice
      Astrida|AA|4|16
      Astrida|AA|10|15
      Astrida|BB|9|9
      Betacab|BB|5|10
      Betacab|CC|2|20
      Betacab|DD||25
      Canutility|AA|8|15
      Canutility|CC||19
      ] (delimiter is '|');