Forum Discussion
Periksson
7 years agoFrequent Visitor
SELECTEDVALUE ALTERNATERESULT
I have made a new measure that will give me only selected top N from the list of goods ranging from 5 to 100 e.g.
The ALTERNATERESULT in SELECTEDVALUE is default BLANK() so it shows an empty list of goods. I want it to show the whole list of goods when none N of top N is selected.
This is my measures for reference:
Top N Goods = CALCULATE([Profit]; TOPN([Selected N]; wrhsSales; [Profit]; DESC; wrhsSales[Goods]))
Selected N = SELECTEDVALUE('Select Top N'[Select N])I can type in a really big number that will certainly be outside the list but that is bad programming. Can anyone help?
Try this:
Selected N = SELECTEDVALUE('Select Top N'[Select N], COUNT(wrhsSales[Goods]))
1 Reply
- tarunsinglaSolution Sage
Try this:
Selected N = SELECTEDVALUE('Select Top N'[Select N], COUNT(wrhsSales[Goods]))