The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
User | Count |
---|---|
15 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
25 | |
13 | |
12 | |
8 | |
8 |