MDX and DAX Queries

+2 votes
1. How do i Write an MDX query to obtain top 3 companies based on the revenue generated.

2. How do i Write a DAX query to obtain the bottom 5 customers based on the order price.
Oct 9, 2019 in Power BI by Gloria
• 160 points
1,605 views

1 answer to this question.

+1 vote

Hi Gloria,

Use TopCount() function to return the top n records.

For Example - 

SELECT [Measures].[Revenue] ON 0,
TOPCOUNT([hierarchy ]... [company name], 3, [Measures].[Revenue])
ON 1
FROM [table name]
answered Oct 9, 2019 by raksha
Thanks, @Raksha, I have upvoted your answer.

Related Questions In Power BI

0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 33,030 points
18,272 views
0 votes
1 answer

Calculate and filter function - DAX

Hi Praneeth, Calculate () by default perform calculations ...READ MORE

answered May 2, 2019 in Power BI by Cherukuri
• 33,030 points
1,097 views
0 votes
1 answer

all and allExcept - DAX functions

Hi Satish, All function is used when you ...READ MORE

answered May 7, 2019 in Power BI by Cherukuri
• 33,030 points
6,240 views
0 votes
1 answer

What is the difference between DAX and Power Query?

DAX stands for Data Analysis Expressions. DAX ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,910 points
12,736 views
0 votes
1 answer

Calculate Time Intersection to Correlate Sequences of Independent Events

I think this solution requires a CROSS JOIN implementation. ...READ MORE

answered Oct 26, 2018 in Power BI by Upasana
• 8,620 points
571 views
+3 votes
2 answers

Combine tables in Power BI

You can also achieve this using a ...READ MORE

answered Oct 5, 2018 in Power BI by lina
• 8,220 points

edited Oct 11, 2018 by Kalgi 2,097 views
0 votes
1 answer

Power Bi Dax Table

You need to wrap the numbers in ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,360 points
931 views
0 votes
2 answers

Power BI Dax Multiple IF AND Statements

HI I have Column Patient 12 13 14 15 18 IN Patient=12, 13 Out ...READ MORE

answered May 23, 2019 in Power BI by VNK
18,425 views
0 votes
1 answer

Power BI DAX expression more than 2 or conditon

Heyyy @Hannah, you just need remove or ([principlecode] = ...READ MORE

answered Oct 29, 2018 in Power BI by Kalgi
• 52,360 points
2,657 views
0 votes
1 answer

Power Query : Adding Columns and Multiple files

The following call, FirstRowAsHeader = Table.PromoteHeaders(TableWithoutHeader) shall replace the ...READ MORE

answered Feb 14, 2019 in Power BI by Upasana
• 8,620 points
1,421 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP