Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
st-dat
Helper III
Helper III

PowerPivot Dax/Measures issues on TopN and Drill Down

 

1 – Top 5 grocery total spend or Total Sum of the Top 5 grocery item   
 (First identify the 5 Top Grocery items and sum their amount = $26500   
Expected Answer26500     
       
Supplier NameAmount     
grocery - 117000     
grocery-166000     
grocery - 205000     
grocery - 154500     
grocery-94000     
Expected Answer $                     26,500.00     
       
2-  Top 10 items total spend     
Expected Answer $                     58,800.00     
       
Supplier NameNumber of OrderAmount    
Supplier-18959500    
Supplier-19828200    
Supplier-17727200    
Supplier-16606000    
Supplier-11407000    
Supplier-20455000    
Supplier-15454500    
Supplier-13303000    
Supplier-8343400    
Supplier-5505000    
 Expected Answer $                    58,800.00    
       
3 - Nnumber of Orders placed to TOP 10 Suppliers and total dollars spend   
Answers expected559 $                    59,400.00    
       
Item NumberDateSupplier NameNumber of OrderAmountProduct  
1501/23/2018Supplier-15454500Grocery 
1601/24/2018Supplier-16606000Grocery 
1701/25/2018Supplier-17727200hardMEDICARE 
1801/26/2018Supplier-18959500childMEDICATION
1901/27/2018Supplier-19828200adultCAREDRUG 
2001/28/2018Supplier-20455000GROCERY 
901/17/2018Supplier-9404000GROCERY 
1101/19/2018Supplier-11407000GROCERY 
1301/21/2018Supplier-13303000abccNOTKOWN 
501/13/2018Supplier-5505000HOMECARE 
  Answers expected559 $  59,400.00  
       
4 – Top 5 items total spend      
Answer expected  $                    37,900.00    
       
Item NumberDateSupplier NameNumber of OrderAmountProduct  
1701/25/2018Supplier-17727200hardMEDICARE 
1801/26/2018Supplier-18959500childMEDICATION
1901/27/2018Supplier-19828200adultCAREDRUG 
1101/19/2018Supplier-11407000GROCERY 
1601/24/2018Supplier-16606000Grocery 
  Answer expected  $  37,900.00  
       
5- Top 3 computer products  total spend (Computer products are products that start with four lower Case letters) 
Item Number      
Answer expected:-  $                    24,900.00    
       
 DateSupplier NameNumber of OrderAmountProduct 
1701/25/2018Supplier-17727200hardMEDICARE 
1801/26/2018Supplier-18959500childMEDICATION
1901/27/2018Supplier-19828200adultCAREDRUG 
  Answer expected:-  $  24,900.00  
       
       
6 -  Drill down through  double-clicking the report data of 30 is     
displaying 1000 rows on excel instead of actual 30.    
Kindly help with solution      
2 ACCEPTED SOLUTIONS

Hi,

 

You may download my PBI solution file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

You are welcome.  Have a good day.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

40 REPLIES 40
st-dat
Helper III
Helper III

I have 2 tables: AAA and BBB      
Request: - To count number of department names in table BBB that exist in table AAA department 
where table AAA Faculty name contains 'PG'     
         
Expected Result is Nine (9) Departments     
         
Table name ----  AAA       
FACULTYDEPARTMENT      
Science-PGBiology       
ScienceBiology       
Science-PGChemistry      
ScienceChemistry      
Science-PGPhysics       
ArtsLaw       
Arts-PGGeography      
ArtsLiterature      
Arts-PGLaw       
Arts - PGLiterature      
Arts - PGSocial       
         
         
Table name  -- BBB       
SCHOOLDEPARTMENT      
Science-PGBiology       
ScienceBiology       
Science-PGChemistry      
ScienceChemictry      
Science-PGPhysics       
ArtsLaw       
Arts-PGGeography      
ArtsLiterature      
Art-PGLaw       
Science - PGBotany       
         

Hello Ashish,

 

The second solution for the question below also works as expected.

 

Many thanks to Ashish and the forum team

 

I have 2 tables: AAA and BBB      
Request: - To count number of department names in table BBB that exist in table AAA department 
where table AAA Faculty name contains 'PG'
Ashish_Mathur
Super User
Super User

Hi,

 

Which of the two is your requirement:

 

  1. Computing the single figure of Top 5/Top 10 spend; or
  2. Identifying which Suppliers are the Top 5/Top 10; or
  3. Both of the above

Please also share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

3- both

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello,

 

Thanks for your help.

Having revewed your last question, my request is 'Computing the single figure of Top 5/Top 10 spend'

Please ignore my earlier response where I indicated  'both'

 

I hope the master fact table will be useful as my effort failed to send the link requested.  I'm working from home using windows 7 and office 2007.

 

Note: My post contains expected result as a single figure. For clarity, I included the table extract from the master table to arrive at the expected result.

 

Esteem Regards

Hi,

 

You may download my PBI solution file from here.

 

Hope this helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello Ashish,

 

I'm most delighted for the wonderful support. The solutions works perfectly.

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

One more thing today, I have post a request for help and will appreciate your usual intervention...... I have a Total Sum of Sales and need calculate result for the following period.

 

I need to Find the TOTAL SALES during the period below: 

 

1) Last Week

2) Current Week To Date

3) Last Fiscal Month

4) Current Fiscal Month To Date

5) Last Fiscal Quarter

6) Current Fiscal Quarter todate

7) Last Fiscal Year

😎 Current Fiscal Year To date

 

Thank you so much

Share the link of that post.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

Below is the link to my post, it is same as the question in my recent message to you.

 

https://community.powerbi.com/t5/Desktop/bd-p/power-bi-designer

 

Thanks

 

I will appreciate your valuable contribution, inspite input from someone who suggested some website to read for solution

That is not the link of the post.  Click and check.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thnak you so much, I will confirm the outcome on monday when I will be able open the pbix file sent.

 

Warm Regards

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

I work only on PowerPivot 2016, hope the solution will open and compatible for use on the platform....

Yes.  Just redo all of it in Excel 2016.  It will work.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hello,

 

Just came to mind, could you help create a measures for the solution so that it can re-use often to address other needs such applying it to different periods and with other tables.

 

Loking forward to your response. I'm most delighted for your help.

Hi,

 

The measure has already been created in the PBI file shared with you yesterday.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.