79213742

Date: 2024-11-22 05:19:18
Score: 0.5
Natty:
Report link

you can create a new table and sort the category column by sort column

enter image description here

do not create relationship between two tables

then create a measure

MEASURE =
SWITCH (
    TRUE (),
    SELECTEDVALUE ( 'Table (2)'[category] ) = "A", CALCULATE ( SUM ( 'Table'[value] ), 'Table'[category] = "A" ),
    SELECTEDVALUE ( 'Table (2)'[category] ) = "B", CALCULATE ( SUM ( 'Table'[value] ), 'Table'[category] = "B" ),
    CALCULATE ( SUM ( 'Table'[value] ) )
)

enter image description here

Reasons:
  • Probably link only (1):
  • Has code block (-0.5):
Posted by: Ryan