Forum Discussion

mohsenask's avatar
mohsenask
Helper II
5 years ago
Solved

Matrix row shows different values to table

Hi

 

Im struggling to figure out this problem. Ive worked with Matrix before but this is driving me crazy. I have a table with following columns
Date

Total Qty - quantity of cabins available
Total Sold - quantity of cabins sold

When using a simple Table visual it shows the correct Total Qty available which is max of 9. But when i use the Matrix as a visual it seems to show a different total available rooms for certain dates. The total rooms cannot be more than 9.

 

Just FYI Ive created three measures as below to be able to show items with no data. For e.g.

 

MS_Actual_TotalQty =
IF (
CALCULATE ( SUM ( usp_GetAllocationsalesDetails_PI[TotalQty] ) ) = BLANK (),
0,
CALCULATE ( SUM ( usp_GetAllocationsalesDetails_PI[TotalQty] ) )
)
  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi mohsenask ,

     

    However, I didn't see the error you described in the matrix visual based on your attached .pbix file.

     

    Best Regards,

    Yuna

     

7 Replies

  • mohsenask , Try this

    MS_Actual_TotalQty =
    IF (
    isblank(CALCULATE ( SUM ( usp_GetAllocationsalesDetails_PI[TotalQty] ) )),
    0,
    CALCULATE ( SUM ( usp_GetAllocationsalesDetails_PI[TotalQty] ) )
    )

     

    or

     

    SUM ( usp_GetAllocationsalesDetails_PI[TotalQty] )+0

     

    Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

    • mohsenask's avatar
      mohsenask
      Helper II

       

      amitchandak - Thanks for your reply

       

      Sorry tried to paste the table here but it gives me some weird HTML error. IT says removed the invalid HTML and try submitting again but doesnt work.

      Tried uploading csv or xls - didnt allow.

       

      The below extract from the data table shows totalQty as max 9

      in a simple table visual the rows show correct TotalQty as 9

       

       

      However in the matrix its shows TotalQty as 16 for certain dates

       

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mohsenask ,

     

    However, I didn't see the error you described in the matrix visual based on your attached .pbix file.

     

    Best Regards,

    Yuna

     

    • mohsenask's avatar
      mohsenask
      Helper II

      Anonymous 

       

      I fixed the problem - the file on dropbox is updated one. Ill move it. Thanks however!!

      • rATIKAg's avatar
        rATIKAg
        Microsoft Employee

        Hi Can you please share hopw you solved this. Thanks

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi mohsenask ,

     

    If your problem has been solved, Could you kindly Accept it as the solution? ğŸ˜‰

     

    Best Regards,

    Yuna