Forum Discussion
use data from two different excel tabs
- Anonymous2 years ago
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.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]) )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]) * 100Please 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:
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.
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.
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])
)
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:
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.