Forum Discussion

hamachekm's avatar
hamachekm
Helper I
5 years ago
Solved

Histogram based on measure range

Hi,   I'd like to make a column chart to summarize the distribution of a measure by SalesPerson. (It is not possible to make the measure a calculated column or column in the original table).    T...
  • hamachekm's avatar
    hamachekm
    5 years ago

    Thanks Ashish. 

     

    One edit to your measure: in the middle you write "Calculatetable (Values([2022 Projection]))... "  . Because [2022 Projection] is a measure, how can you use the Values() function which expects a Column? 

     

    I dropped the CalculateTable(Values()) and just left [2022 Projection] and it works. Here's the full expression:     Sales people count = COUNTROWS(FILTER(ADDCOLUMNS(VALUES('Date'[Sales person]),"ABCD",CALCULATE([2022 Projection],[2022 Projection])))),COUNTROWS(FILTER('Buckets',[ABCD]>='Buckets'[Lower]&&[ABCD]<'Buckets'[Upper]))>0))

     

    For completeness, this is the measure that goes in the Values of the bar graph. The Axis is the Bucket column. I also added an Order column to sort the Bucket on table too. 

     

    Thanks,

    Mike