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
AbdurRahman
New Member

Simple but not able to resolve

Dear Friends,

I have more than 2 tables, but for demonstration purpose. I m taking only 2 table

Table 1 : Has Sales,

MonthDayRegionNo of Sales
62India161
618India167
521India113
61India178
62India156
62India149
524India171
527India149
625India114
62India196
625India158
54India105
627India124

Table 2 : Has Order. 

MonthDayRegionNo of order
620India4
627India8
516India1
630India10
67India6
621India4
52India8
520India5
627India6
616India8
621India6
52India5
63India6

Both tables has DAY, MONTH and records,

I want to have a matrix which can give me below table . On top of this, I would like to have MONTH slicer. (here I have a problem , whenever I took month slicer its giving wrong numbers ). 

In a nut shell, I need below table. 

 

AbdurRahman_0-1623857937972.png

 

1 ACCEPTED SOLUTION

Hi @AbdurRahman 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

View solution in original post

5 REPLIES 5
v-rzhou-msft
Community Support
Community Support

Hi @AbdurRahman 

You can try my way to build a calendar table and relate all data tables with calendar table by Key column. You need a key column in all tables to build relationships. Here I use Month *100 +Day as Key table.

Calendar Table:

Calendar = ADDCOLUMNS(CALENDAR(DATE(2021,01,01),DATE(2021,06,30)),"Month",MONTH([Date]),"Day",DAY([Date]),"Key",MONTH([Date])*100+DAY([Date]))

Key in Has Order Table.

Key Order = 'Has Order'[Month]*100+'Has Order'[Day]

 1.png

Key in Has Sales Table.

2.png

Relationship is as below.

3.png

Build a Matrix table as below.

4.png

We need to turn on Show on row function in Values.

5.png

Use Month column in calendar table to build a slicer. Result is as below.

6.png

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

Dear RicoZhou,

 

Thank you so much for solution with detailed explanation, Let me implement this solution with real-time then I will get back to you If i have any obstacles.

 

Thank you

A

Hi @AbdurRahman 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

AbdurRahman
New Member

Thank you for you reply. But in real time, I have a huge file. more than one lakh records each file consist so putting them altogether impact performance. However, Now all of them individual files but I moving them all in database and planning to have DIRECT QUERY. 

 

Could you help me now.

chajinom
Regular Visitor

It is Just an idea, because at least you could do using Power Query before get into PwBI, but also you cand do this using DAX, 
what I'll do is change the name of the value column for something like "Value", I'll add an additional column called number of an there I'll include the description like, No of Sales or No of Order, once the tables are aligned I'll do an UNION on DAX for both tables (It works with as many tables as you need) once the UNION table has been created I'll put as you need to see.

I build the example but I can not load 😄 hope it works,
 Table Has SalesTable Has SalesTable Has OrderTable Has OrderTable UnionTable UnionTable VisualizationTable Visualization

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.