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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
vividarinda
Helper I
Helper I

Condition if value is in another table with measure

I have two tables with a one-to-many relationship on the child's id. The table has other columns including the columns I have depicted below.  The two tables are:

Master Error Limit 
iderrorlimit
D375A1380MWL/U clutch slip failure10
D375A1500L0Clutch engaged double10
D375A15E0MWT/M clutch slip failure9
D375A15SAL1F clutch failure8
D375A15SALHF clutch failure7
D375A15SBL1R clutch failure5
D375A15SBLHR clutch failure10

 

Data Trend  
unitdateiderrorerror
DT078652/12/2024D375A1380MWL/U clutch slip failure1
DT078652/13/2024D375A1380MWL/U clutch slip failure2
DT078652/14/2024D375A1380MWL/U clutch slip failure1
DT078652/12/2024D375A1500L0Clutch engaged double4
DT078652/13/2024D375A1500L0Clutch engaged double9
DT078662/4/2024D375A1380MWL/U clutch slip failure1
DT078662/5/2024D375A1380MWL/U clutch slip failure1
DT078662/6/2024D375A1380MWL/U clutch slip failure1
DT078662/25/2024D375A1500L0Clutch engaged double3
DT078662/26/2024D375A1500L0Clutch engaged double10

 

I want to create visualization TABLE or MATRIX based on Data Trend and Master Limit that returns YES if the COUNT Error from data Trend table exceeds the limit from Master Error Limit Table . How can I do this using with measure? Any help would be appreciated. Thank you so much. 

visual   
unitiderrorcount errorremark
DT07865D375A1380MWL/U clutch slip failure4 
DT07865D375A1500L0Clutch engaged double13yes
DT07866D375A1380MWL/U clutch slip failure3 
DT07866D375A1500L0Clutch engaged double10 
1 ACCEPTED SOLUTION
v-binbinyu-msft
Community Support
Community Support

Hi @vividarinda ,

Please try below steps:

1. create measure with below dax formula

Measure = SUM('Data Trend'[error])
Measure 2 =
VAR _a = [Measure]
VAR _b =
    SELECTEDVALUE ( 'Master Error Limit'[limit] )
RETURN
    IF ( _a > _b, "Yes" )

2. add  a table visual with fields and measure

vbinbinyumsft_0-1715913375275.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
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

2 REPLIES 2
v-binbinyu-msft
Community Support
Community Support

Hi @vividarinda ,

Please try below steps:

1. create measure with below dax formula

Measure = SUM('Data Trend'[error])
Measure 2 =
VAR _a = [Measure]
VAR _b =
    SELECTEDVALUE ( 'Master Error Limit'[limit] )
RETURN
    IF ( _a > _b, "Yes" )

2. add  a table visual with fields and measure

vbinbinyumsft_0-1715913375275.png

Please refer the attached .pbix file.

 

Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-binbinyu-msft ,

Brilliant, thanks! Thank you for the solution.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.