Forum Discussion

aksharacoomar's avatar
5 years ago
Solved

Subtotals Issue on Matrix Report

Hi all,    I am facing a unique issue with a report I'm trying to pull up using PowerBI matrix report. I am trying to pull a report which shows the Plan Revenue vs. Actual Revenue and the date hier...
  • sortega's avatar
    sortega
    5 years ago

    Hello @aksharacoomar , you must condition the value shown in the subtotals, you can use the HASONEVALUE function or the ISINSCOPE function for is, here I leave you a link that can serve you a lot, https://youtu.be/Q_l-6oYOdJ8

  • v-robertq-msft's avatar
    5 years ago

    Hi, aksharacoomar 

    According to your requirement, you can follow my steps:

    1. Create some measures:

     

     

    Day1 =
    
    IF(
    
        HASONEVALUE('Table'[Day]),
    
        MAX('Table'[Day]),
    
    BLANK())
    Holiday1 = 
    IF(
        HASONEVALUE('Table'[Holiday]),
        MAX('Table'[Holiday]),
        BLANK())
    Peak vs. Non-Peak Days1 = 
    IF(
        HASONEVALUE('Table'[Peak vs. Non-Peak Days]),
        MAX('Table'[Peak vs. Non-Peak Days]),
        BLANK())

     

     

    For your amount columns, you can use sum(), like this:

     

    Amount1 = SUM('Table'[Amount])

     

     

    2. Go to the Matrix chart, Use [Day1] to replace [Day], [Holiday1] to replace [Holiday], [Peak vs. Non-Peak Days1] to replace [Peak vs. Non-Peak Days], [Amount1] to replace [Amount], like this:

    And you can get what you want.

     

    You can download my test pbix file from here

     

    Best Regards,

    Community Support Team _Robert Qin

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.