Forum Discussion

FZOU's avatar
FZOU
Helper IV
5 years ago

Power query Calculate

Hello,

 

i'm new to power query and i have a question please !

Does any one know how to transform this dax measure to power query !

 

Measure = calculate (sum( Tab[sales] ),filter(Tab,Tab[Year]=2020))

Thank you 🙂

1 Reply

  • AlB's avatar
    AlB
    Community Champion

    Hi FZOU 

    What is the point of this?

    It depends on how/where you are using the measure. Try something like this

     List.Sum( Table.SelectRows(Tab, each [Year] = 2020 )[sales] )

     

    Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

    Contact me privately for support with any larger-scale BI needs, tutoring, etc.