Forum Discussion
DAX CALCULATION
Hello,
i'm working on a calculated column but i can't get the right result, i have this table and percentYear as a filtre :
My new column named NewPercent should calculate the percent based on product and PercentYear :
If the product is empty like the table above and we don't have a selected PercentYear so 1/12 else if we select a percentyear it should display the Percent equal to the percent column
this is my column formula
Hi FZOU ,
Is your "NewPercent" a calculated column? If you want a dynamic value, you could create a measure to replace this column.
3 Replies
- amitchandakSuper User
I did not get it completely. But you can use earlier to work on the same table
sumx(filter(Table,Table[Year] = earlier(Table[Year]) && Table[Product] = earlier(Table[Product])),Table[Percent])
Sumx can be maxx, averagex or minx
- v-eachen-msftCommunity Support
Hi FZOU ,
Is your "NewPercent" a calculated column? If you want a dynamic value, you could create a measure to replace this column.
- FZOUHelper IV
v-eachen-msft Exactly it was that my problem i transform it to a mesure and it works thank you