Forum Discussion

harirao's avatar
harirao
Icon for Post Prodigy rankPost Prodigy
4 years ago

Matrix Column Subtotal

Hi Team,
I have created a Matrix Table, were Row subtotal & percentage measure is working correctly, but for column subtotal percentage is not coming correctly, but it is howing 100% for all.



Actual result should be as per below snapshot.

Created Measures

DISTINCTCOUNT = if(isblank(DISTINCTCOUNT(RawData[Opportunity ID])), 0 ,
(DISTINCTCOUNT(RawData[Opportunity ID])))

Rev Grp (%) =

if(isblank(calculate(SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT])))),0,calculate(SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT])))) /
if(ISBLANK(calculate(SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT])), ALLSELECTED(RawData[Status_New]))),0,
calculate(SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT])), ALLSELECTED(RawData[Status_New])))

Status = SUMX(VALUES(RawData[Status_New]), (RawData[DISTINCTCOUNT]))

 

Revenue% =
IF(ISBLANK([Status]),0,[Status]) & " / " & FORMAT([Rev Grp (%)], "0%")



Can you please assist me how to fix the column subtotal percentage 

Thank you

 

Regards,

2 Replies

  • You  need to use HASONEVALUE() to figure out when your measure is computed for the column totals.

     

    Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to work with. Avoid posting screenshots of your source data if possible.


  • v-easonf-msft's avatar
    v-easonf-msft
    Icon for Community Support rankCommunity Support

    Hi,  harirao 

    You may need to check the result of measure 'Rev Grp (%)'.

    Can you show that value in you matrix table?

     

    Best Regards,
    Community Support Team _ Eason