Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a measure called “rate” which is using Calculate and filter to return a % against each type.
Type | Rate |
A | 0.50% |
B | 0.20% |
C | 1.10% |
D | 0.00% |
E | 0.00% |
F | 0.00% |
G | 0.00% |
H | 0.00% |
I | 1.30% |
J | 0.00% |
K | 0.00% |
But what I really need is a summary table which returns the number of times the rate falls into each “bin” below, and without showing the Type in a row.
<0.4% | >0.4% | >1% |
8 | 1 | 2 |
I have tried a few methods but no luck so far – any help most appreciated!
Solved! Go to Solution.
Hi @Anonymous
Create measures and add measures to table visual, it would be dynamic with the selection from slicers.
rate =
CALCULATE (
SUM ( 'Table'[d] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] = MAX ( 'Table'[Type] ) )
)
/ CALCULATE (
SUM ( 'Table'[v] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] = MAX ( 'Table'[Type] ) )
)
round_up = ROUNDUP([rate],4)
<0.4% = CALCULATE(DISTINCTCOUNT('Table'[Type]),FILTER('Table',[round_up]<=0.004))
>1% = CALCULATE(DISTINCTCOUNT('Table'[Type]),FILTER('Table',[round_up]>=0.01))
0.4%~1% = CALCULATE(DISTINCTCOUNT('Table'[Type]),FILTER('Table',[round_up]>=0.004&&[round_up]<0.01))
Hi @Anonymous
It is impossible to group by a measure.
Please change the measure to a caluclated column.
Hi,
The measure "Rate" is a ratio, so it can't go in a calculated column because it cannot be aggregated.
I guess the only way is to create some kind of summarised table where the "Rate" has already been calculated at the required category level.
Hi @Anonymous
Create measures and add measures to table visual, it would be dynamic with the selection from slicers.
rate =
CALCULATE (
SUM ( 'Table'[d] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] = MAX ( 'Table'[Type] ) )
)
/ CALCULATE (
SUM ( 'Table'[v] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Type] = MAX ( 'Table'[Type] ) )
)
round_up = ROUNDUP([rate],4)
<0.4% = CALCULATE(DISTINCTCOUNT('Table'[Type]),FILTER('Table',[round_up]<=0.004))
>1% = CALCULATE(DISTINCTCOUNT('Table'[Type]),FILTER('Table',[round_up]>=0.01))
0.4%~1% = CALCULATE(DISTINCTCOUNT('Table'[Type]),FILTER('Table',[round_up]>=0.004&&[round_up]<0.01))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |