Forum Discussion
Issues merging values and columns in PBI
- 6 years ago
Hi cewjr9842 ,
For the chart, you can create it like so:
For the Matrix, you can create it like so:
1. Enter a table "Range" and sort "Range" column by column "Index".
2. Create a measure.
Sum of n = SWITCH ( TRUE (), SELECTEDVALUE ( Range[Range] ) = "Missing", CALCULATE ( SUM ( 'Table'[n] ), 'Table'[time_bucket] = -1 ), SELECTEDVALUE ( Range[Range] ) = "<30", CALCULATE ( SUM ( 'Table'[n] ), 'Table'[time_bucket] <= 30 ), SELECTEDVALUE ( Range[Range] ) = "30-60", CALCULATE ( SUM ( 'Table'[n] ), 'Table'[time_bucket] > 30 && 'Table'[time_bucket] <= 60 ), SELECTEDVALUE ( Range[Range] ) = "1-2 min", CALCULATE ( SUM ( 'Table'[n] ), 'Table'[time_bucket] > 60 && 'Table'[time_bucket] <= 120 ), SELECTEDVALUE ( Range[Range] ) = ">2 min", CALCULATE ( SUM ( 'Table'[n] ), 'Table'[time_bucket] > 120 && 'Table'[time_bucket] <= 2400 ), SELECTEDVALUE ( Range[Range] ) = ">20 min", CALCULATE ( SUM ( 'Table'[n] ), 'Table'[time_bucket] > 2400 ), SELECTEDVALUE ( Range[Range] ) = BLANK (), SUM ( 'Table'[n] ) )3. Create the Matrix.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi cewjr9842 ,
For the chart, you can create it like so:
For the Matrix, you can create it like so:
1. Enter a table "Range" and sort "Range" column by column "Index".
2. Create a measure.
Sum of n =
SWITCH (
TRUE (),
SELECTEDVALUE ( Range[Range] ) = "Missing", CALCULATE (
SUM ( 'Table'[n] ),
'Table'[time_bucket] = -1
),
SELECTEDVALUE ( Range[Range] ) = "<30", CALCULATE (
SUM ( 'Table'[n] ),
'Table'[time_bucket] <= 30
),
SELECTEDVALUE ( Range[Range] ) = "30-60", CALCULATE (
SUM ( 'Table'[n] ),
'Table'[time_bucket] > 30
&& 'Table'[time_bucket] <= 60
),
SELECTEDVALUE ( Range[Range] ) = "1-2 min", CALCULATE (
SUM ( 'Table'[n] ),
'Table'[time_bucket] > 60
&& 'Table'[time_bucket] <= 120
),
SELECTEDVALUE ( Range[Range] ) = ">2 min", CALCULATE (
SUM ( 'Table'[n] ),
'Table'[time_bucket] > 120
&& 'Table'[time_bucket] <= 2400
),
SELECTEDVALUE ( Range[Range] ) = ">20 min", CALCULATE (
SUM ( 'Table'[n] ),
'Table'[time_bucket] > 2400
),
SELECTEDVALUE ( Range[Range] ) = BLANK (),
SUM ( 'Table'[n] )
)
3. Create the Matrix.
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I would first like to start by saying thank you, this hit the nail right on the head!