Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Customer | Week No | Condition | Week Result |
A | 12 | 1 | 12 |
A | 10 | 0 | 12 |
A | 10 | 0 | 12 |
A | 12 | 0 | 12 |
B | 11 | 0 | 9 |
B | 9 | 1 | 9 |
Hi all,
I want to create result column. it should be related with if condition section is 1 for a specific customer. please check example table and advise. thanks
Please try this expression in your calculated column to get your desired result. Replace WeekResults with your actual table name.
Week Result New =
VAR __thiscustomer = WeekResults[Customer]
VAR __weekwith1condition =
CALCULATE (
MIN ( WeekResults[Week No] ),
ALLEXCEPT ( WeekResults, WeekResults[Customer] ),
WeekResults[Condition] = 1
)
RETURN
IF ( WeekResults[Condition] = 1, WeekResults[Week No], __weekwith1condition )
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
Try this calculated column
Column =
VAR result =
MAXX (
FILTER (
ALL ( 'Table' ),
'Table'[Customer] = EARLIER ( 'Table'[Customer] )
&& 'Table'[Condition] = 1
),
'Table'[Week No]
)
RETURN
result
Did I answer your question? Mark my post as a solution!
Appreciate with a kudos 🙂
User | Count |
---|---|
128 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
115 | |
102 | |
71 | |
61 |