March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi All,
I'm trying to return a Yes / No value in a card visual in order to trigger a notificatoin alert to team members based on below condition.
IF(lates coverage % < previous coverage % for at least one project, "yes", "No")
If this condition is true for at least one project, I need to alert the particular team.
I use weekly data.
I tried below dax and it didn't work.
Solved! Go to Solution.
Hi,
I am not sure how your datamodel looks like, but please try something like below.
Alert1 =
VAR _project =
ADDCOLUMNS (
DISTINCT ( 'Table1'[projectName] ),
"@latest",
CALCULATE (
MAX ( 'Table1'[Coverage Value] ),
'Table1'[Date] = MAX ( 'Table1'[Date] )
),
"@previous",
CALCULATE (
MAX ( 'Table1'[Coverage Value] ),
'Table1'[Date]
= ( MAX ( 'Table1'[Date] ) - 7 )
)
)
VAR _condition =
COUNTROWS ( FILTER ( _project, [@latest] < [@previous] ) )
VAR _result =
IF ( _condition >= 1, "Yes", "NO" )
RETURN
_result
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi,
I am not sure how your datamodel looks like, but please try something like below.
Alert1 =
VAR _project =
ADDCOLUMNS (
DISTINCT ( 'Table1'[projectName] ),
"@latest",
CALCULATE (
MAX ( 'Table1'[Coverage Value] ),
'Table1'[Date] = MAX ( 'Table1'[Date] )
),
"@previous",
CALCULATE (
MAX ( 'Table1'[Coverage Value] ),
'Table1'[Date]
= ( MAX ( 'Table1'[Date] ) - 7 )
)
)
VAR _condition =
COUNTROWS ( FILTER ( _project, [@latest] < [@previous] ) )
VAR _result =
IF ( _condition >= 1, "Yes", "NO" )
RETURN
_result
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi, Thank you so much for the support.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
121 | |
97 | |
85 | |
69 | |
61 |
User | Count |
---|---|
138 | |
120 | |
109 | |
99 | |
97 |