Forum Discussion

YunJ's avatar
YunJ
Icon for Post Prodigy rankPost Prodigy
6 years ago
Solved

Why no Total value shown in the matrix?

Hi, I wrote a measure to decide when selecting slicer Category, which Store_eng and Sub-Category should appear.

Here you can see, when selecting slicer Category=Skincare, the Total values appear.

However, when selecting Category=Makeup, Total values do not show. Why is it like this??

Thanks a lot for your time.

  • YunJ , Measure get recalculated for Grand total. In case if the condition will be checked for Grand total and will be false. In case of filter, the data is getting removed from scope and Grand total is calculated on that. So you will have the correct total. But there are expectations when calculation use row context to get value. In that case again we need to use summarize or Values to force a row context and sum/avg from there

     

    Like in this example group is forced as row context. there can be one than one

    sumx(summarize(table,table[group],"_1",[SuperAveage]),[_1])

     

    sumx(summarize(table,table[group],table[group1],"_1",[SuperAveage]),[_1])

5 Replies

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

    Hi YunJ 

    Is this problem sloved? 
    If it is sloved, could you kindly accept it as a solution to close this case and help the other members find it more quickly?
    If not, please feel free to let me know.
     
    Best Regards
    Maggie
  • YunJ , Instead of if try to use the filter. Otherwise force row context using values or summarize .

     

    • YunJ's avatar
      YunJ
      Icon for Post Prodigy rankPost Prodigy

      Hi amitchandak I tried to use FILTER like the following, but the Sub-category in the visual seems like more than what I wrote in the measure.

      • amitchandak's avatar
        amitchandak
        Icon for Super User rankSuper User

        YunJ , Measure get recalculated for Grand total. In case if the condition will be checked for Grand total and will be false. In case of filter, the data is getting removed from scope and Grand total is calculated on that. So you will have the correct total. But there are expectations when calculation use row context to get value. In that case again we need to use summarize or Values to force a row context and sum/avg from there

         

        Like in this example group is forced as row context. there can be one than one

        sumx(summarize(table,table[group],"_1",[SuperAveage]),[_1])

         

        sumx(summarize(table,table[group],table[group1],"_1",[SuperAveage]),[_1])