Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Using slicer in summarised table

I have below DAX:

 

SUMMARIZE(Filter(Table ,Table[type trans]="Invoice")
, Table[As of Date]
, Table[account_cd]
, "DBE", if([Measure 01]>0,[Measure 01],blank()), "CRE", if([Measure 01]<0,[Measure 01],BLANK()))

 

I want to use type trans as a slicer and take values from it rather than hardcoding. How to do that ?

 

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    I performed summarise inside a measure and its now working

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    Why do you need the SUMMARIZE table? Can you just put the columns in a matrix and create a measure:

     

    DBE= if([Measure 01]>0,[Measure 01],blank()), "CRE", if([Measure 01]<0,[Measure 01],BLANK())

     

    Then use Type Trans as a slicer.

     

    Has this post solved your problem? Please mark it as a solution so that others can find it quickly and to let the community know your problem has been solved. 

     

    If you found this post helpful, please give Kudos.

    I work as a trainer and consultant for Microsoft 365, specialising in Power BI and Power Query. 

    https://sites.google.com/site/allisonkennedycv

    • Anonymous's avatar
      Anonymous
      Not applicable

      Account code cannot be used in table since we require table in summarised format.

       

      Measure 01 has positive and negative values , positive ones has to be grouped under debit and negative under credit based on As of date and account cd.

      Measure 01 has following DAX = Sum(Table[Amount]) , and when we select a particular type trans only amounts pertaining to that should be used.

       

       

      • amitchandak's avatar
        amitchandak
        Super User

        Anonymous , if your formula is correct then just remove that from the filter and add to the slicer. As long as tables are connected it should filter