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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
JPS_SEQ
Regular Visitor

use data from two different excel tabs

Hi,

 

I've a excel database with two tabs:

Tab 1:

BookTypeTeamMonth
AUrgentAJanuary
BNormalAJanuary
ANormalBJanuary
DUrgentDFebruary
FNormalCMarch
ENormalBMarch
ENormalAApril
GUrgentDMay
HUrgentCMay
HNormalBMay

 

Tab 2

BookNumber of pages
A80
B40
C70
D5
E20
F30
G

15

 

 

I 'd like to create a table with the ratio of "type" per "100 pages" with the following configuration:

 

Type: Normal    
TeamJanuaryFebruary MarchApril May
A     
B     
C     
D     

 

For instance:

January should be calculated as:  

   there are two books in january: book A and B. Total of pages: 80 +40 = 120 pages

   there was one "normal" ocurrence for team A in january. 

   Thus, the ratio for team A in January is:   1/120*100 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JPS_SEQ ,

In order to make it easier to sort by month name, I have added a column of MonthNo to the sample data table, please don't care.

vjunyantmsft_0-1717465545013.png

First please create a calculated table using the following DAX:

Table = 
SUMMARIZE(
    'Table 1',
    'Table 1'[Month],
    'Table 1'[MonthNo],
    "TotalPages",
    SUMX(RELATEDTABLE('Table 2'), 'Table 2'[Number of pages])
)

vjunyantmsft_1-1717465618489.png

Then use this DAX to create a measure:

Total of pages = 
VAR _Normal =
CALCULATE(
    COUNTROWS('Table 1'),
    'Table 1'[Type] = "Normal"
)
RETURN
_Normal / MAX('Table'[TotalPages]) * 100

Please set the percent sign form and the number of decimal places to be retained in the result of this measure.
Create the visual like this and the final output is as below:

vjunyantmsft_2-1717465743407.png


Best Regards,
Dino Tao
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

1 REPLY 1
Anonymous
Not applicable

Hi @JPS_SEQ ,

In order to make it easier to sort by month name, I have added a column of MonthNo to the sample data table, please don't care.

vjunyantmsft_0-1717465545013.png

First please create a calculated table using the following DAX:

Table = 
SUMMARIZE(
    'Table 1',
    'Table 1'[Month],
    'Table 1'[MonthNo],
    "TotalPages",
    SUMX(RELATEDTABLE('Table 2'), 'Table 2'[Number of pages])
)

vjunyantmsft_1-1717465618489.png

Then use this DAX to create a measure:

Total of pages = 
VAR _Normal =
CALCULATE(
    COUNTROWS('Table 1'),
    'Table 1'[Type] = "Normal"
)
RETURN
_Normal / MAX('Table'[TotalPages]) * 100

Please set the percent sign form and the number of decimal places to be retained in the result of this measure.
Create the visual like this and the final output is as below:

vjunyantmsft_2-1717465743407.png


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

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors