Forum Discussion
Dynamic Histogram with Measures
- 6 years ago
Hi Anonymous ,
First of all, We can create a calculated table as the Axis:
X-Axis = ADDCOLUMNS ( ADDCOLUMNS ( GENERATESERIES ( -1, 0.9, 0.1 ), "Value2", [Value] + 0.1 ), "RangeName", FORMAT ( [Value], "Percent" ) & " ~ " & FORMAT ( [Value2], "Percent" ) )Then we can create a measure to count the value dynamicly
Count = COUNTROWS ( FILTER ( 'Table', [Measure] >= MIN ( 'X-Axis'[Value] ) && [Measure] <= MAX ( 'X-Axis'[Value2] ) ) )
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
Hi Anonymous ,
First of all, We can create a calculated table as the Axis:
X-Axis =
ADDCOLUMNS (
ADDCOLUMNS ( GENERATESERIES ( -1, 0.9, 0.1 ), "Value2", [Value] + 0.1 ),
"RangeName", FORMAT ( [Value], "Percent" ) & " ~ "
& FORMAT ( [Value2], "Percent" )
)
Then we can create a measure to count the value dynamicly
Count =
COUNTROWS (
FILTER (
'Table',
[Measure] >= MIN ( 'X-Axis'[Value] )
&& [Measure] <= MAX ( 'X-Axis'[Value2] )
)
)
If it doesn't meet your requirement, kindly share your sample data and expected result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Best regards,
- Anonymous6 years agoNot applicable
v-lid-msft Excellent !! Works perfect !
Thanks !!
- Anonymous6 years agoNot applicable
to avoid a value that lies on the edge of a category being counted in both the the lower and higher categories, I recommend changing the count measure from
Count = COUNTROWS ( FILTER ( 'Table', [Measure] >= MIN ( 'X-Axis'[Value] ) && [Measure] <= MAX ( 'X-Axis'[Value2] ) ) )to
Count =
COUNTROWS(
FILTER(
'Table',
[Measure]
> MIN( 'X-Axis'[Value] )
&& [Measure]
<= MAX( 'X-Axis'[Value2] )
)
)