Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 created with DAX must be ranked with Quanty and sales prices. Sales price and Quantity are directly proportional; when one of them increases other one also increases.
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.
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
Not exactly sure I get it. But, maybe check out
@Anonymous , Not very clear you want to do.
For Rank Refer these links
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale
@Anonymous so what exactly you are after, an Index column? How you are planning to use it? I guess sales price is a measure?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hi @Anonymous
according the radacad RANKX bible from @amitchandak link, you can try to create a measure like
RANKX(
ALL('Table') ,
CALCULATE(
SUM('Table'[Sales Price])
)
)
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
93 | |
75 | |
62 | |
50 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |