Forum Discussion
Breaking down count measure in table visual
- Anonymous2 years ago
Hi peter_mx5 ,
Thanks for the reply from lbendlin .
Please try:
Create a disconnected table:
product_id
158
159
162
200
2345
1234
123
1
88
Drag the product id of the new table to the slicer:
Create a measure:
times bought together = VAR_curProduct= SELECTEDVALUE ( 'Pid'[product_id] ) VAR_orderid= CALCULATE ( MAX ( 'order_details_ss'[order_id] ), 'order_details_ss'[product_id] = _curProduct ) RETURN IF ( MAX ( 'order_details_ss'[order_id] ) = _orderid && MAX ( 'order_details_ss'[product_id] ) <> _curProduct, CALCULATE ( DISTINCTCOUNT ( order_details_ss[product_id] ), ALLSELECTED ( 'Pid'[product_id] ) ), BLANK() )Set the filter condition in the Filter pane to measure not blank.
The table on the left is the original table. When 162 is selected, the table on the right displays data with the same order_id as 162.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
Hi peter_mx5 ,
Thanks for the reply from lbendlin .
Please try:
Create a disconnected table:
|
product_id |
|
158 |
|
159 |
|
162 |
|
200 |
|
2345 |
|
1234 |
|
123 |
|
1 |
|
88 |
Drag the product id of the new table to the slicer:
Create a measure:
times bought together =
VAR_curProduct=
SELECTEDVALUE ( 'Pid'[product_id] )
VAR_orderid=
CALCULATE (
MAX ( 'order_details_ss'[order_id] ),
'order_details_ss'[product_id] = _curProduct
)
RETURN
IF (
MAX ( 'order_details_ss'[order_id] ) = _orderid
&& MAX ( 'order_details_ss'[product_id] ) <> _curProduct,
CALCULATE (
DISTINCTCOUNT ( order_details_ss[product_id] ),
ALLSELECTED ( 'Pid'[product_id] )
),
BLANK()
)
Set the filter condition in the Filter pane to measure not blank.
The table on the left is the original table. When 162 is selected, the table on the right displays data with the same order_id as 162.
pbix file is attached.
If you have any further questions please feel free to contact me.
Best Regards,
Yang
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!