Forum Discussion
sivarajan21
Post Prodigy
3 years agofind max and min value from same column obtained from dynamic slicer selection and find difference
Dear all, I need to create a dax for dynamically selecting sites from the slicer and find the difference from max & min selected. For example, in above screenshot, I have selected 3 sites,...
- 3 years ago
Here is a sample of the pseudo code:
performance measure = divide(maxx(table,units)-minx(table,units),maxx(allselected(table),units)-minx(allselected(table),units))
you can refine that with SUMMARIZE(ALLSELECTED()) etc. Really depends on how you want to interpret it.
- 3 years ago
performance measure = var mmax = CALCULATE(max(DataProfile[Units]),allselected(Contacts[Name])) var mmin = CALCULATE(min(DataProfile[Units]),allselected(Contacts[Name])) return mmax-mmin
lbendlin
Super User
3 years agoperformance measure =
var mmax = CALCULATE(max(DataProfile[Units]),allselected(Contacts[Name]))
var mmin = CALCULATE(min(DataProfile[Units]),allselected(Contacts[Name]))
return mmax-mminbjackson2760
Helper I
9 months agoThank you so much for your response. I wasn't an original responder but I came across this solution and it worked for me. So Thanks!