Forum Discussion
Anonymous
6 years agoNot applicable
INDEX for table with DAX
Hello , I want to create index wiht DAX for following table. But I could not create a column because working in Direct Query. That why I need a different solution. The index that will be cre...
v-zhenbw-msft
6 years agoCommunity Support
Hi Anonymous ,
We can use the following measure to get an index.
index =
IF (
HASONEVALUE ( 'Table'[CHAN] ),
RANKX ( ALLSELECTED ( 'Table'[CHAN], 'Table'[QUANTY] ), [SALES PRICE] )
)
The result like this,
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Hi v-zhenbw-msft ,
Could yo share pbix with me?
It seems like to work but in my desktop does not works, although I checked my code a lot.Thanks, Br