Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I am working on a data set where we have a list similar to this
id, name, year,earned_savings
A1006, aliance 1, 2021, 0
A1006, aliance 1, 2022, 8,934.253
I'm using the following code
Solved! Go to Solution.
Hi @gpalomar ,
Please have a try.
Create a measure.
NoMoneyBothYears2 =
IF (
COUNTROWS (
FILTER (
'public mssp_2021_2022_aco',
'public mssp_2021_2022_aco'[year] = 2021
&& 'public mssp_2021_2022_aco'[earnsaveloss] <= 0
)
) > 0
&& COUNTROWS (
FILTER (
'public mssp_2021_2022_aco',
'public mssp_2021_2022_aco'[year] = 2022
&& 'public mssp_2021_2022_aco'[earnsaveloss] <= 0
)
) > 0,
"Lost money both years",
BLANK ()
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @gpalomar ,
Please have a try.
Create a measure.
NoMoneyBothYears2 =
IF (
COUNTROWS (
FILTER (
'public mssp_2021_2022_aco',
'public mssp_2021_2022_aco'[year] = 2021
&& 'public mssp_2021_2022_aco'[earnsaveloss] <= 0
)
) > 0
&& COUNTROWS (
FILTER (
'public mssp_2021_2022_aco',
'public mssp_2021_2022_aco'[year] = 2022
&& 'public mssp_2021_2022_aco'[earnsaveloss] <= 0
)
) > 0,
"Lost money both years",
BLANK ()
)
How to Get Your Question Answered Quickly
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
10 | |
7 | |
5 | |
4 | |
3 |
User | Count |
---|---|
12 | |
11 | |
10 | |
9 | |
8 |