Forum Discussion
DAX code not working with config variable used in a measure
zeebee48 , I think You should prefer to use a measure and values with topn
example
ProtoTotBytes TOPN =
VAR temp2 = TOPN(numIP, alllselected(Proto), [ProtoTotBytes], DESC)
RETURN CALCULATE(SUM(Proto[total_bytes]), temp2 , values(Proto))
prefer values to be the column in place of table
refer if needed
TOPN: https://www.youtube.com/watch?v=QIVEFp-QiOk&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=42
Thanks amitchandak , your solution worked but still i am not sure what was wrong with my solution. Logically it seemed correct...can't we have two config variables for the same measure...can you please help me understand on what was the issue in my approach ? Went through the youtube link you shared, that was useful but would like to know the issue with my approach. Thanks.