Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Metric not populating for all dates in Matrix Visual

Hello,

I am having difficulty getting a measue to populate ALL fields within a matrix visual. The metric is producing the correct value for the single row that does populate, and even populates when a slicer selection is made. 

My formula is below:

 


Daily $  =

 

Var calc1 = CALCULATE(SUMX(FILTER('PT','PT'[Invoice]=1),[Daily FC $ AMT]),GROUPBY('PT','PT'[Invoice],'PT'[Invoice]))

 

Var calc2 = CALCULATE(SUMX(FILTER('PT','PT'[Invoice]=2),[Daily FC $ AMT]),GROUPBY('PT','PT'[Invoice],'PT'[Invoice]))

 

Var calc3 = CALCULATE(SUMX(FILTER('PT','PT'[Invoice]=3),[Daily FC $ AMT]),GROUPBY('PT','PT'[Invoice],'PT'[Invoice]))

 

Var calc4 = calc1+calc2+calc3

 

Return calc4

 

The intention of the measure is to return a portfolio's return amount in dollar terms. Any suggestions on how to get the measure to populate all date rows in the matrix are greatly appreciated.

1 Reply

  • Anonymous , what is need for the group by?

     

    Try like

     

    CALCULATE(SUMX(FILTER('PT','PT'[Invoice]in {1,2,3}),[Daily FC $ AMT]))

     

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