Forum Discussion
srlabhe
1 year agoSuper User
Finding Max Days per row
Hi PBI Gurus I have below data Where Days CO is a measure calculated based on selected date in slicer like below = var _maxDate=[MaxAsOfDateSelected] var _diff= NETWORKDAYS(SELECTEDV...
- 1 year ago
Hi srlabhe
Try this:
CO with top days = CALCULATE ( -- Get the CO with the highest [Days CO] in the current filter context MAXX ( TOPN ( 1, -- Create a table of COs with their corresponding [Days CO] values SUMMARIZECOLUMNS ( 'Table'[CO], "@value", [Days CO] ), [@value], DESC -- Sort descending by [Days CO] and take top 1 ), [CO] -- Return the CO name (could also use [@value] to return the max value) ), ALLSELECTED () -- Respect slicers and visuals while removing row context )
v-dineshya
1 year agoCommunity Support
Hi srlabhe ,
Thank you for reaching out to the Microsoft Community Forum.
I have created MO and Days MO Measure.
Please refer below output snap and attached PBIX file.
I hope this information helps. Please do let us know if you have any further queries.
Regards,
Dinesh