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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
PurpleGate
Resolver III
Resolver III

Two measures in the same table results in one measure turning blank

Hi all,

 

I have two measures to calculate hours:

 

All Hours = CALCULATE( [SumOfHours], KEEPFILTERS ( 'Type'[Resource] = "Resource"), KEEPFILTERS ('Type'[Unit] = "Time"))​

 

Filtered Hours = CALCULATE( [SumOfHours], KEEPFILTERS ( 'Type'[Resource] = "Resource"))

 

When I put each of them in different tables, I see the result. BUT when I put both measures in the same table, one of them disappears. 

PurpleGate_0-1700209431085.png

PurpleGate_1-1700209440702.png

PurpleGate_2-1700209457605.png

 

Is this a bug or something wrong in the calculation? I have never come across this before! 😅

 

 

1 ACCEPTED SOLUTION
BeaBF
Super User
Super User

@PurpleGate Hi! Try with these:

All Hours =
CALCULATE(
SUMX(
FILTER(
'Type',
'Type'[Resource] = "Resource" && 'Type'[Unit] = "Time"
),
[SumOfHours]
)
)

Filtered Hours =
CALCULATE(
SUMX(
FILTER(
'Type',
'Type'[Resource] = "Resource"
),
[SumOfHours]
)
)

BBF

View solution in original post

1 REPLY 1
BeaBF
Super User
Super User

@PurpleGate Hi! Try with these:

All Hours =
CALCULATE(
SUMX(
FILTER(
'Type',
'Type'[Resource] = "Resource" && 'Type'[Unit] = "Time"
),
[SumOfHours]
)
)

Filtered Hours =
CALCULATE(
SUMX(
FILTER(
'Type',
'Type'[Resource] = "Resource"
),
[SumOfHours]
)
)

BBF

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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