Rahul Jain 5 Posted September 23, 2020 Share Posted September 23, 2020 How To get hte Max(Month([Date])) OVER filtered value (first or second)by another column(i.e. rank having values like first, second, third) from our Data Table in a calculated column or Countunique(Month([Date])) OVER filtered value (first or second) power bi dax is like this CountMonths = CALCULATE(DISTINCTCOUNT('table'[DATE]), 'table'[rank] IN { "first" }) Link to comment Share on other sites More sharing options...
Fabian Duerr Posted September 24, 2020 Share Posted September 24, 2020 It is not so clear what you want to achieve. Are you using any filtering or do you just want to aggregate over a rank column The calculated column will use you entire data set. Filtering will not change the result. But if you just want to aggregate/summarize for each rank then simply do: Max(Month([Date])) OVER [your.rank.column] Is this what you were looking for Link to comment Share on other sites More sharing options...
Rahul Jain 5 Posted September 25, 2020 Author Share Posted September 25, 2020 Hi @fabd This works partially, as in it works in caluculated column but giving error in case of "Custome Expression" when used in visualisation I can use it in Calculated Column but then it is not dynamic and value not changing when filter applied Link to comment Share on other sites More sharing options...
Fabian Duerr Posted September 25, 2020 Share Posted September 25, 2020 A value in a calculated column will never change when you apply filters. You can use cross tables when you want it to be dynamical. Filters will apply there. I'm sure we can find a suitable expression for your visualization as well. Can you provide a sample data set (dxp file) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now