Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Custom dimension based on measure

Hi all,

 

I am attempting to create a dimension to use on a bar graph. Where I am having x axis being a categorization/buckets of a calculation done by a measure. What I want to do, is to categorize the results of measure 4 in intervals and display the count of records I have in those intervals. Below is a screenshot with the expected result.

 

 

Data:

 

DateNumberDimension 1Dimension 2Dimension 3Dimension 4
01.01.20232313AABBCCDD
01.01.202341235BBCCCCDD
02.01.202321312AAEEAACC

 

Measures:

Measure 1: Number; sum(Number)
Measure 2: Number LY; calculate(Number, sameperiodlastyear(date))
Measure 3: Number vs. Number LY: Number - Number LY

Measure 4: Number vs. Number LY (%): Divide(Number vs. Number LY, Number LY)

 

I hope my explaination makes sense. Thanks in advance.

2 Replies

  • CoreyP's avatar
    CoreyP
    Solution Sage

    I think what you need to do is called binning. However, you can only bin a calculated column, not a measure. So, you'll need to create a summarized calculated table to use, rather than your measure. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Corey. Thanks for your suggestion. I tried creating a calculated column, but I didnt give me a satisfactory result. Tried something like: if measure 4 < 4% and > 2% then "2-4%". But it seemed like it evaluted the entire column and not each row.