Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have sheets
Sheet1 have id and its duration time
Sheet2 have id and its duration time
I wana calculate how many person take mor than 119 minutes
And i wana sure there is no repeated id
Solved! Go to Solution.
Hi @Eng-mohd if your sheet 1 and sheet 2 have the same structure, and data for durations is in minutes (same in two sheets) possible solution (adjsust sheets / column names to your need)
1. Create new table
CombinedTable = UNION(Sheet1, Sheet2)
2. Create measure
Persons_More_Than119Minutes =
CALCULATE(
COUNTROWS(DISTINCT(CombinedTable[ID])),
CombinedTable[Duration] > 119
)
Proud to be a Super User!
Hi @Eng-mohd ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _sheet1 =
CALCULATETABLE (
VALUES ( 'Sheet1'[id] ),
FILTER ( 'Sheet1', 'Sheet1'[duration time] > 119 )
)
VAR _sheet2 =
CALCULATETABLE (
VALUES ( 'Sheet2'[id] ),
FILTER ( 'Sheet2', 'Sheet2'[duration time] > 119 )
)
VAR _tab =
DISTINCT ( UNION ( _sheet1, _sheet2 ) )
RETURN
COUNTROWS ( _tab )
Best Regards
Hi @Eng-mohd ,
You can create a measure as below to get it, please find the details in the attachment.
Measure =
VAR _sheet1 =
CALCULATETABLE (
VALUES ( 'Sheet1'[id] ),
FILTER ( 'Sheet1', 'Sheet1'[duration time] > 119 )
)
VAR _sheet2 =
CALCULATETABLE (
VALUES ( 'Sheet2'[id] ),
FILTER ( 'Sheet2', 'Sheet2'[duration time] > 119 )
)
VAR _tab =
DISTINCT ( UNION ( _sheet1, _sheet2 ) )
RETURN
COUNTROWS ( _tab )
Best Regards
No its not same structure and ther is no relationship between theme
@Eng-mohd share structure and details with expected output
Proud to be a Super User!
Hi @Eng-mohd if your sheet 1 and sheet 2 have the same structure, and data for durations is in minutes (same in two sheets) possible solution (adjsust sheets / column names to your need)
1. Create new table
CombinedTable = UNION(Sheet1, Sheet2)
2. Create measure
Persons_More_Than119Minutes =
CALCULATE(
COUNTROWS(DISTINCT(CombinedTable[ID])),
CombinedTable[Duration] > 119
)
Proud to be a Super User!
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.