Forum Discussion

ritanoori's avatar
ritanoori
Icon for Resolver I rankResolver I
5 years ago
Solved

Trying to offset rows with 0 value in same period

Hello everyone

I have a table where includes PO-POLine number, Amount and Period. 

I created a measure using calculate ALLEXCEPT

PO Offset = CALCULATE([Amount],ALLEXCEPT('Table','Table'[PO-POLine],'Table'[Period]))
Offset = if([PO Offset] = 0,"Yes","No")
then adding "Offset" measure to filter pane to exclude "Yes". 
but it doesn't seem to be working. looking at the screenshot below. It seems that the measure is looking at the Amount in all period to decide if PO is offset "has value" or not. 
What did I do wrong and how can I solve this issue. 
 
Amount in October is 0 yet the PO offset measure is showing -564
  • I solved the issue by creating calculated column in the table for "offset" instead of a measure. Added that to my visual filter and it works fine  ðŸ˜€

4 Replies

  • ritanoori 

    Are period name and period the same column?

    If not, maybe you can change the DAX to below.

    PO Offset = CALCULATE([Amount],ALLEXCEPT('Table','Table'[PO-POLine],'Table'[Period Name]))

     

    • ritanoori's avatar
      ritanoori
      Icon for Resolver I rankResolver I

      Thanks. But it's not solving the issue. 

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

        ritanoori 

        Could you pls provide the sample data to have a further investigation?

         

         

  • I solved the issue by creating calculated column in the table for "offset" instead of a measure. Added that to my visual filter and it works fine  ðŸ˜€