Forum Discussion
Syndicate_Admin
4 years agoAdministrator
Top N with static values
Hello I have a table of dimensions with the attributes of a product, and another table (of dimensions too) with the warehouses where it is sold. It is required to initially generate a top of ...
- Anonymous4 years ago
Hi Syndicate_Admin ,
I created some data:
You can use tabs to display:
Here are the steps you can follow:
1. Create measure.
VALOR_INICIAL_TOP_N_ORIG = var _Table=SUMMARIZE(ALL('Table'),'Table'[Product],"Total",SUM('Table'[Value])) var _TOP_TABLA=TOPN(3,_Table,[Total],DESC) return IF( MAX('Table'[Product]) in SELECTCOLUMNS(_TOP_TABLA,"1",[Product]), 1,0)2. Place [VALOR_INICIAL_TOP_N_ORIG]in Filters, set is=1, apply filter.
3. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
amitchandak
4 years agoSuper User
Syndicate_Admin , Try like
Assume value in measure , Try like
Measure =
var _tab = TOPN(3,allselected(table[Product]),[#VALOR_HECHOS_INICIAL],Desc)
return
calculate([Value], filter(table, table[#VALOR_HECHOS_INICIAL] in _tab))