Forum Discussion

PawelK0296's avatar
PawelK0296
New Member
1 year ago
Solved

Exclude data from Subtotals in Power BI Matrix (But Keep Row Values)

Hello, Below is a high-level overview of my issue. Data Model: I have three tables: Table A: FS Account, Date Table B: Date, FS Account, Level 1, Level 2, ..., Level 5 Table C: Date, FS Accoun...
  • maruthisp's avatar
    1 year ago

    Hi PawelK0296,

     

    As per your original post, assuming you have value column is TableC[Value] and FS Account is in TableC[FS Account]:

    Adjusted Value =
    VAR IsTotal = HASONEVALUE('TableC'[FS Account]) = FALSE
    RETURN
    IF(
    IsTotal,
    CALCULATE(
    SUM('TableC'[Value]),
    NOT STARTSWITH('TableC'[FS Account], "S")
    ),
    SUM('TableC'[Value])
    )

    Above DAX measure does below:
    1.Detects if the current row is a total/subtotal.
    2.Excludes statistical accounts (those starting with "S") from totals.
    3.Includes all accounts in row-level values.

    Please let me know if you have further questions.

    If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks! 

     

    Best Regards, 

    Maruthi 

    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X